1

I'm beginner in C# and SQL Server. Currently I’m developing a program, the problem is my database file is in DB folder inside project folder. When I try to detach the database file in SQL Server Management Studio it gives an error:

"Data Source=localhost;Initial Catalog=test;Integrated Security=true"

When I the change data source to this

"Data Source=db/test.mdf;Initial Catalog=test;Integrated Security=true"

it gives an error. I don’t know how to insert database file with project to InstallShield to create setup file.

1

2 Answers 2

1

You may set up connection using DATA-> new data source dialog. There you will set up all the parameters visually. I think the problem here is that full path is not specified. Also path should be in quotes.

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

1 Comment

I agree, I always try to specify the full path, just to be safe. +1
0

Also whenever you need help on connection strings for any database http://www.connectionstrings.com/ is a great reference.

Comments

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.