Click here to Skip to main content
15,884,739 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
i ve been developing windows form application using visual c# in visual studio 2008 and mssql server 2008.Is it necessary to install mssql server 2008 in the enduser desktop separately ? my database file is in .mdf extensinon.my connection string in app.config goes like:
data source=.\SQLEXPRESS;Integrated Security=true;AttachDbFilename=|DataDirectory|\mydatabase.mdf
it works well on my pc.but when i install it to other and open it throws error as :"A database with same name exist or special file cannot be open or it is located in unc share." i ve checked the datadirectory and specified .mdf file is present there. please help me out!!
Posted

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900