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
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Kirtan PatelRank #292 · 8.6K reputationPosted Sep 16, 2009, 2:30 AM EDT
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 :)
Roei BarRank #1,271 · 1.4K reputationPosted Sep 16, 2009, 3:31 AM EDT
the DB you have is part of the .NET project Template
you dont actually need it if you are not using the DB :-)
rania Magdy9 reputationPosted Sep 16, 2009, 4:17 AM EDT