Skip navigation.
Home

Connect to a remote database

Al salam alikom

I want to connect my PC to a database (MS SQL 2000 and MS SQL 2005) that exists on another PC directly.

I used sockets before to connect my PC to the PC of the database then the PC connect to the database , but this takes alot of time , so I'm trying to connect my PC to the database directly without sockets.

Plz, Could anyone tell me how??

Thanks in advance.

http://www.exampledepot.com/e

http://www.exampledepot.com/egs/java.sql/ConnectSqlServer.html 

As you can see in this code mentioned in the link above, there is a parameter called "serverName" which in your case must be set to the IP address of the other computer you want to connect to and on which resides the remote database.

So as far as I know, there is no need for socket programming here in the first place. And this should be faster I guess..

Thanks alot

Thanks alot, I'll try this isA.