Reputation: 33
In my windows application there is an error. Please can anyone tell me what is my mistake in connection string for local database? This is my code:
<add name="ACT_WIN.Properties.Settings.Database1ConnectionString"
connectionString="Data Source=(LocalDB)\v11.0;
AttachDbFilename=|DataDirectory|\Database1.mdf;
Integrated Security=True"
providerName="System.Data.SqlClient" />
And this is my error:
Upvotes: 1
Views: 459
Reputation: 26
I think your Wrong is in app.config
-> ConnectionString
-> Data Source
=. or someting else,without set other Properties
try this in ConnectionString
...
Data Source=(localdb)\v11.0;AttachDbFilename=|DataDirectory|\DB.mdf;integrated security=true;database=DB" providerName="System.Data.SQLExpress"
Good Luck
Upvotes: 1