Skip to Content.
Sympa Menu

freetds - *** Need help with jdbc connection ***

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: aragonne AT earthlink.net
  • To: freetds AT franklin.oit.unc.edu
  • Subject: *** Need help with jdbc connection ***
  • Date: Mon, 18 Nov 2002 18:52:02 -0500


Hi there,

I downloaded the freetds_jdbc.jar file and placed its location in the
CLASSPATH. I wrote a simple test class that tries to instantiate a
Connection object to a SQLServer7.0 database but keep getting the
following error:

Exception- java.lang.NullPointerException

Any ideas what I might be doing wrong?

Thanks!

Here's the simple src code:

===========================================================
package webtutor.dbdata;

import java.sql.*;

public class TestFreeDTS
{
public static void main (String[] args)
{
Connection con = null;
try
{
Class.forName("com.internetcds.jdbc.tds.Driver");
con =
DriverManager.getConnection("jdbc:freetds:sqlserver://172.16.12.112:1433/webtutor_v2;user=webtutor_sa;password=LAs64kj9","","");

}
catch (Exception e)
{
System.err.println("<error> trying to get Connection
object:
" +e);
}
}
}



  • *** Need help with jdbc connection ***, aragonne, 11/18/2002

Archive powered by MHonArc 2.6.24.

Top of Page