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";
You can user Visual Studio's server explorer to connect to your DB and then you'll get the correct connection string:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.