Click here to Skip to main content
15,909,193 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have a small software which did with vb.net and database created with SQL server 2008. I want to make an exe file for this software with including database.

same time I want to know about the process of the exporting to exe and how to setup that exe to get a connection string automatically?

What I have tried:

------------------------------
Posted
Updated 29-Sep-18 19:48pm

1 solution

Don't. You should not include SQL Server in your installation. There are a couple of reasons:
0) You can only distribute SQL Server Express for copyright reasons - not SQL Server full version.
1) They may already have SQL Server installed on the network. If so, then they will presumably want to use that version.
2) If they do have SQL server installed and you start proliferating SQL server Express instances, you are going to annoy the heck out of the database administrator...
3) A single site installation of SQl Server is a lot more likely to be backed up than a number of scattered version under user control.
4) Sql server is quite complex for a "normal" user to install and administer - it is not a good idea!
5) It will destroy the primary advantage of using Sql Server over SqlCE or SQLite - multiuser access. If everyone installs their own copy of SQL server, then you will have multiple copies of your database, each used by a single person. This will cause some confusion, and (depending on how you wrote the original database) may take some considerable effort to combine into a single instance when the problem is realized.

If you need multiuser access - and that's why we use SQL Server - then you need to attach to an existing server and the DB on that if one exists. If it doesn't, then the installation needs to be planned, not based on "I installed the app first", or you end up with it on the salesman's laptop, and all is fine until he goes out of the office and everybody else can't use the app.
If you don't need multiuser access, then don't use SQL Server - use Access, SqlLite, or SQLCompact instead.
 
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