Click here to Skip to main content
15,893,622 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I do not know this is a fool question or not.
The point is, i build an app in vb.net and SQL server to be my dbase
I am using my own server which name USER-PC, so that when i copy the .exe program for running to other PC, it can not be run because the dbase not set in that PC, so how to solve this.

Any help will be apreciated.
Thanks,

-Rudy
Posted

1 solution

When you connect to a database you define the database location via the connection string. When a computer wants to connect to SQL Server it needs to define the SQL Server address using the Server attribute, remote or local. The server location can be expressed with computer name if DNS can be used, IP address etc. Also if the SQL Server instance is a named instance, then the instance name needs to be specified in Server attribute.

For examples have a look at http://www.connectionstrings.com/sql-server/[^]
 
Share this answer
 
v2

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