0

I'm developing an app in wpf and I created an .mdf database to store my data. The problem comes when I compress the release .exe with their .mdf database and try to execute it in another computer.

It seems that the application can't access to the data stored, but I don't know why...

To access my DB I created a Linq to SQL object called IMEIDB.dbml, declared a variable

private DataBase.IMEIDBDataContext db = new DataBase.IMEIDBDataContext();

and then used Linq

var query = from t in db.TerminalesCorta select t;

These are my connection strings:

<connectionStrings>
    <add name="RIMEI3.Properties.Settings.conexion" connectionString="Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=|DataDirectory|\DataBase\IMEIDB.mdf;Integrated Security=False;Connect Timeout=30"
        providerName="System.Data.SqlClient" />
    <add name="RIMEI3.Properties.Settings.IMEIDBConnectionString"
        connectionString="Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=|DataDirectory|\DataBase\IMEIDB.mdf;Integrated Security=False"
        providerName="System.Data.SqlClient" />
</connectionStrings>

0 Answers0