TipGiver
Programmer
- Sep 1, 2005
- 1,863
Hello,
I have a windows application that runs fine. Now i decided to share the application though a lan with other personal computers. I have made the output folder shared and i can access it from an other computers in the network. The application runs but it crashes when it comes to communicate with the database. The message is:
"The file '\\pc_name\...\db.mdf' is on a network path that is not for database files. An attempt to attach an auto-named database for file '\\pc_name\...\db.mdf' failed. A database with the same name exists, or specified file cannot be opened, or it is located on a UNC share"
My current connection string is:
String.Format("Data Source=.\SQLEXPRESS;AttachDbFilename={0}\database\db.mdf;Integrated Security=True;User Instance=False", Application.StartupPath)
Does anyone have any suggestion on what to do?
Thanks for any suggestion
I have a windows application that runs fine. Now i decided to share the application though a lan with other personal computers. I have made the output folder shared and i can access it from an other computers in the network. The application runs but it crashes when it comes to communicate with the database. The message is:
"The file '\\pc_name\...\db.mdf' is on a network path that is not for database files. An attempt to attach an auto-named database for file '\\pc_name\...\db.mdf' failed. A database with the same name exists, or specified file cannot be opened, or it is located on a UNC share"
My current connection string is:
String.Format("Data Source=.\SQLEXPRESS;AttachDbFilename={0}\database\db.mdf;Integrated Security=True;User Instance=False", Application.StartupPath)
Does anyone have any suggestion on what to do?
Thanks for any suggestion