my dog learned polymorphism
The moose likes JDBC and Relational Databases and the fly likes Connecting to sql server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Connecting to sql server" Watch "Connecting to sql server" New topic

Connecting to sql server

Sameera Abeysinghe
Ranch Hand

Joined: Nov 15, 2004
Posts: 104
Hi all
I am using jdk 1.5 with netbeans 4
I need to connect to sql server. I download the jdbc driver from
Sorry but I cant remember the path
But when I try to connect to the server it gives an error
Establishing socket or connection
Did I download the wrong driver? is there a specific driver for jdk 1.5
Any one give me an answer with the correct driver path to download
I am using sql server 2000 developers edition
I am using sql server 2000 personal edition

And tell me what this means

Is the sqlserver listen on TCP/IP?


Thank You.
David Ulicny
Ranch Hand

Joined: Aug 04, 2004
Posts: 724
Is the sqlserver listen on TCP/IP?

It means that you are trying to connect to the server through TCP/IP. You could configure your SQL server to use another connection type e.g. pipes etc. Maybe you are connecting to wrong port.

SCJP<br />SCWCD <br />ICSD(286)<br />MCP 70-216
Pradyut Bhattacharya
Ranch Hand

Joined: Aug 12, 2004
Posts: 63
are u using the port number 1433 in the url in the jdbc driver path in the program. thats the default port that sql server uses

also check that the sql server that u r connecting is listening to the port or the sql server is started or not
also check that please check that sql server agent and sql server distributed coordinater is started or not.


Nitin Jawarkar
Ranch Hand

Joined: Dec 18, 2004
Posts: 79
hello Sameera

can you post the code which you aregiving error.ok


Cheers<br />Nitin
I agree. Here's the link:
subject: Connecting to sql server
It's not a secret anymore!