Click here to Skip to main content
12,818,816 members (29,762 online)
Rate this:
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 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 1:06am

1 solution

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

    Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170308.1 | Last Updated 25 Jun 2012
Copyright © CodeProject, 1999-2017
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