I doing the pro on c# contain sql database 2005, and it worked 100% when I run on my PC.
And it show error message when I run it on other PC.
This is Connection statement I used:
Code |
Code
SqlConnection cn = new SqlConnection(@"Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database1.mdf;Integrated Security=True;User Instance=True");Regards...

Kirtan PatelRank #292 · 8.6K reputationPosted Aug 4, 2009, 4:55 PM EDT
You need to install SQL Server Express Edition+.Net Framework to Run you Project on Another PC .
if you dont install it will generate exception and Program will be terminated
Happy Coding :)
Have a Nice Day
belal shakatra15 reputationPosted Aug 4, 2009, 5:35 PM EDT
But How I can Program on c# and use database, without install SQL on other pc.
If no way, So this is problem in c# with me.
Please help me....
Kirtan PatelRank #292 · 8.6K reputationPosted Aug 4, 2009, 5:43 PM EDT
but
if you Just Want to Run the Application You Programmed on other pc.
You Need FrameWork + SQL Server Installed on PC Which you want to use to Run Application you Programmed in C#