connection problems with the jdbc driver

Reddy R rreddy at home.com
Sun Jan 30 04:34:19 EST 2000


I have similar problem with Microsoft SQL server 6.5 and the latest FreeTDS 
Jdbc driver. I am using JDK 1.2.2. I get the following message when I use 
FreeTDS Jdbc driver. I got the latest code and compiled it. The problem 
exists with precompiled version also.

java.sql.SQLException: Network error- Connection refused: no further 
information

	at 
com.internetcds.jdbc.tds.Constructors.newConnection(Constructors.java:300)

	at com.internetcds.jdbc.tds.Driver.connect(Driver.java:257)

	at java.sql.DriverManager.getConnection(DriverManager.java:457)

	at java.sql.DriverManager.getConnection(DriverManager.java:137)


// Driver and URL for FreeTDS Jdbc driver
Class.forName("com.internetcds.jdbc.tds.Driver");
conn = DriverManager.getConnection(url, "username", "password"); // url =
"jdbc:freetds:sqlserver://servername/dbname",

The same code works fine under SUN's JDBC-ODBC bridge driver when used as
follow. 

// Driver and URL with SUN's JDBC-ODBC bridge driver
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
conn = DriverManager.getConnection(url, "username", "password"); // url =
"jdbc:odbc:dbname",

I am not sure what I am doing wrong. Any help is appreciated

Thanks
-Reddy R




More information about the FreeTDS mailing list