Click here to Skip to main content
15,887,683 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hi every body
i finish for first time a project windows form application with C# and SQL server.but i want to build exe file for another computer that install .
i use Sql server Express,please help me to creat it.
thank you
Posted
Comments
samira 2013 17-Sep-13 9:47am    
Hello again
I would advise you to create installation packages. But there is still a problem. Fact that I have two databases that have exactly one connection is established. My data is stored in the second database, but unfortunately first database added to solution explorer.
or I have a connection in server explorer how can it add to solution explorer
I hope I explained it right.
Thanks for your help.

You don't want an EXE file, you want an installation package. That will ensure that the necessary requisites such as the appropriate .NET version is installed as well as the application exe file and so forth. Try creating a new project in your solution: a "Setup and Deployment" from the "Other Project Types" branch of the Visual Studio project templates.

But...
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.
 
Share this answer
 
Comments
samira 2013 18-Sep-13 1:43am    
hello
tanks for your help
i creat instalation but As you've said, the installation can not communicate with the database.
What's your opinion.I have a little chance. Grateful to get the most convenient and fastest way to get introduced.
tank you

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