Click here to Skip to main content
15,923,273 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have created a windows form and using SQL 2008, my question is - if i create a setup file and if i install it to another computer then will i need to install SQL on that computer? can u please tell me how my application will run .
Posted
Updated 9-Feb-14 0:16am
v3

Your shouldn't install SQL server on another PC.
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.


You should have written your application so that it loads the connection string for SQL from a configuration file - I assume you have done this? Because if you have hard coded it into your app, you will have to change the string for every installation...
 
Share this answer
 
It depends on what you want to do. options:
1- target computer may be isolated. then, you have to install sql server on that machine.
2- your application may run on computers connected to a network. then you can select one computer as your sql server host machine and others can connect it.

in each case, your SqlConnection needs a connection string to the sql server. it is better to save that connection string in the application configuration file.
 
Share this answer
 
v3

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