Reputation: 731
I've created a database using Visual Studio 2015 by adding it locally as a mdf file
following this guide: Walkthrough creating a local database SQL Server Express
The exception that gets thrown is Format of the initialization string does not conform to specification starting at index 81.
I'm building a Windows Forms application.
My connection string looks like this string cs = @"Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=|DataDirectory|\TestDb.mdf;Integrated";
Upvotes: 0
Views: 5513
Reputation: 8020
You can user Visual Studio's server explorer to connect to your DB and then you'll get the correct connection string:
Upvotes: 2