*** Need help with jdbc connection ***
aragonne at earthlink.net
aragonne at earthlink.net
Mon Nov 18 18:52:02 EST 2002
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);
}
}
}
More information about the FreeTDS
mailing list