Click here to Skip to main content
15,867,308 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
when i use local sql database in my app how i can make "database connection string" to work on all other computer when i make setup project?
Posted
Comments
Richard C Bishop 30-Oct-13 11:11am    
Unfortunately you cannot. You will need a dedicated server for the database for other machines to access. The only other option is that each machine has the database installed.
joshrduncan2012 30-Oct-13 11:21am    
That's not necessarily true. I'm creating a project here at work right now that uses the SQL Server Compact Edition and it works on more than 1 machine when I create the setup via InstallShield.
Richard C Bishop 30-Oct-13 11:25am    
Indeed, however, the SQL Server Compact Edition still must be on the machine. Whether it's a prerequisite to install or part of the application. I think the OP was hoping all machines could connect to the local instance.
joshrduncan2012 30-Oct-13 11:27am    
OP's question is rather vague, but I am leaning towards agreeing with you.
Richard C Bishop 30-Oct-13 11:28am    
I thought so as well, so I just answered it how I understood it I reckon.

1 solution

The connection string defines how to access the database. So, it doesn't matter if it is local right now when you deploy you'll need to change the connection string to point to wherever the database is in production.

This is why you keep connection strings in the config file of your application.
 
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