Click here to Skip to main content
15,880,469 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi every one first of all wish you all very happy new year

Now My Question is this.

I wanna to create a window application using c#. Now I want to know if i use sql server database and then after completion of my project when i will create setup then where i have to store database. I need that user will have not to install vs framework and sql database in his system before use my application.So please tell me what is the solution for database that it will install automatically in users system who is going to install my application

Regard
Azad Chauhan
Posted

1 solution

The best way to do this is to use SQL Server Compact, or SQLite, which runs via a dll and a local file. If you use SQL Server Express or any of the bigger versions, you will need a connection string, and you will need to either restore a DB you ship, or run scripts to create it. You can write code to assume that SQL Server is installed and can be reached via (local), and you can perhaps write code to search the network ( SQL Server itself does that, but badly, so I wouldn't count on it ), but, if you ship with a need for the full SQL Server, you can't assume the user has it, or that your app can find it.

If it were me, I'd be writing a C++ installer app to install .NET, run my msi, install SQL Server Express locally if it's not there, and configure it.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900