Skip to Content.
Sympa Menu

freetds - RE: [freetds] Connection problem

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Зверев Виталий Борисович <VZverev AT genesis.spb.ru>
  • To: "'freetds AT lists.ibiblio.org'" <freetds AT lists.ibiblio.org>
  • Subject: RE: [freetds] Connection problem
  • Date: Fri, 17 Jan 2003 17:33:28 +0300

Title: Message

Perhaps, you forget to include a suitable driver jar into a CLASSPATH env variable.


[ВЗ>]  -----Original Message-----
From: Thirnrayan, Balaji [mailto:Balaji.Thirnrayan AT sabre.com]
Sent: Friday, January 17, 2003 5:23 PM
To: freetds AT lists.ibiblio.org
Subject: [freetds] Connection problem

Hi ,
 
I am using freeTds JDBC driver to connect to MS Sql 6.5. I am getting following exception. Please let me know what am I missing. I have given the source code also for your reference.
 

Exception- java.lang.NullPointerException

java.sql.SQLException

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

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

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

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

at com.DS.utils.DB_Connection.main(DB_Connection.java:114)

 

SOURCE CODE:

try {

Class.forName("com.internetcds.jdbc.tds.Driver"); 

Connection con = DriverManager.getConnection("jdbc:freetds:sqlserver://<MY SQL SERVER>:1433/stssqls1",<userID>, <password>);

if ( con != null)

System.out.println("CONNECTED");

}

catch ( Throwable t) {

t.printStackTrace();

}

Balaji Thirnrayan
(817) 264 7967

 



  • [freetds] Connection problem, Thirnrayan, Balaji, 01/17/2003
    • <Possible follow-up(s)>
    • RE: [freetds] Connection problem, Зверев Виталий Борисович, 01/17/2003

Archive powered by MHonArc 2.6.24.

Top of Page