Click here to Skip to main content
15,914,905 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi there, am developing a windows database application, when i try to connect to my sql server 2005 database using my development computer where the server and database are installed, everything works out fine, but when i install my application on another computer on the same Local Area Network as my server, the application does not connect to the database, or Sql server. How can i go about this please?

Thanks in advance.
Yours faithfully
Martin
Posted

Are you using Windows Authentication on your machine and the user on the other machine is not set up to access the SQL server?

Take a look at this
 
Share this answer
 
this web site will be useful to get all information about connection strings
http://connectionstrings.com/
 
Share this answer
 
You may have used localhost inside connectionstring for connecting, That's why it is connecting from your devlopement pc,
To use it from anywhere use IP address or ComputerName rather to be connected from anywhere,

Please vote and Accept Answer if it Helped.
 
Share this answer
 
change DataSource name from "." or (local) to Server name where your database is stored.
 
Share this answer
 
Another cause could be using integrated security instead of sql aunthentication so i suggest switching from integrated security to sql aunthentication and then connect using ip address/computer name as suggested. Also check to make sure that sql is enable for remote connections as it is usually disabled by default and if u are behind a firewall make sure to add rules so that it can connect remotely! Hope this helps
 
Share this answer
 
you should verify if your database server has tcpip connection enabled in mssql configuration manager. This option is not a default setting.
 
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