I have created a LocalDB
database in my project and its connection string is :
Data Source=(LocalDB)\v11.0;AttachDbFilename="E:\Projects\visual studio 2013\Projects\sqlce\mydb.mdf";Integrated Security=True;Connect Timeout=30
How should I pass it to SqlConnection()
?
Note that it has an address within quotation marks. Have I done anything wrong?
I guess even if I program it correctly it won't work in another computer which doesn't have that .mdf
file in that exact place. Isn't it so?
How can I have a program with a portable database so I can easily publish my pp?