0

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";

1 Answer 1

2

You can user Visual Studio's server explorer to connect to your DB and then you'll get the correct connection string:

http://www.c-sharpcorner.com/uploadfile/suthish_nair/how-to-generate-or-find-connection-string-from-visual-studio/

Sign up to request clarification or add additional context in comments.

2 Comments

mate, you made my life soooo much easier!! I did not know that detail in VS thanky you very much!!!
Glad I could help. Good luck.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.