Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to 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 25-Jun-12 0:06am

1 solution

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



Advertise | Privacy | Mobile
Web02 | 2.8.140926.1 | Last Updated 25 Jun 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100