How to publish a C# windows forms application that uses a SQL Database?
-
Thursday, March 15, 2012 6:04 PMHi. I just like to know how to publish my c# application which uses a SQL database. I have the database file here in my computer, but when I publish the application and install it in another computer, it doesn't work because the database file cannot be found in that computer. I think this has to do with the connection strings or something like that. Any help would be great.
All Replies
-
Thursday, March 15, 2012 9:22 PM
If your DB can be local, then use SQL CE (=compact edition)
It can be used on every computer, even if that computer does not have a SQL server.
It downloads automatically within seconds.
Start here:
http://msdn.microsoft.com/en-us/library/aa983341.aspx
Noam B.
Do not Forget to Vote as Answer/Helpful, please. It encourages us to help you...- Proposed As Answer by Noam B Friday, March 16, 2012 8:38 AM
- Marked As Answer by Jason Dot WangMicrosoft Contingent Staff, Moderator Friday, March 23, 2012 7:56 AM
-
Friday, March 16, 2012 2:34 AM
Hi guy,
Here is a detailed explanation about Installing sql server database with visual studio setup as follows:
http://techbrij.com/145/install-sql-server-database-with-visual-studio-setup
Beside above article, here is a specific workaround about .NET 2.0 C# – Windows Installer and the Connection String:
http://wlasson.wordpress.com/tutorialscode/net-20-windows-installer-and-the-connection-string-c/
I hope those help you.
Sincerely,
Jason Wang
orichisonic http://blog.csdn.net/orichisonic If a post answers your question, please click "Mark As Answer" on that post and "Mark as Helpful".
- Marked As Answer by Jason Dot WangMicrosoft Contingent Staff, Moderator Friday, March 23, 2012 7:56 AM

