Click here to Skip to main content
11,928,987 members (53,955 online)
Rate this:
Please Sign up or sign in to vote.
See more: Windows database setup
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

Azad Chauhan
Posted 1-Jan-13 6:58am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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.

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.151126.1 | Last Updated 1 Jan 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100