C# Project with Sql 2005 database
Hi All,
I have a SQL 2005 Database attached to my project with this connection string:
Data Source=.\SQLEXPRESS;AttachDbFilename=D:\CSharp\Store\Database\Store.mdf;Integrated Security=True
The problem is: when I release the project to setup.exe, it ask for the database,
I need a solution that doesn't require me to give the database to the client.
Please answer me
rania MagdyPosted Sep 16, 2009, 8:17 AM
Roei BarPosted Sep 16, 2009, 7:31 AM
the DB you have is part of the .NET project Template
you dont actually need it if you are not using the DB :-)
Kirtan PatelPosted Sep 16, 2009, 6:30 AM
Solution is Here
dont forget to mark "Do you like answer" please it will give me some credits :)
Its Reason is You Have used Fixed Database Location in Your Connection String
just Place Your Database Where You having the Program (exe)
and use Connection String Like
Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Store.mdf;Integrated Security=True
and Provide Database File too With Exe In Setup :)