freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: "Laurent BRUYNOOGHE" <lbruynooghe AT compubase-europe.com>
- To: freetds AT franklin.oit.unc.edu
- Subject: coding problem or JDK problem
- Date: Fri, 23 Feb 2001 12:10:11 -0500
Hi,
I try to use freetds_jdbc driver and i have problem.
I am using JBuilder 4 with JDK 1.3.0-C
this is the source code :
import java.sql.*;
import java.io.*;
public class t0001
{
static public void main(String args[])
throws SQLException, java.lang.ClassNotFoundException, IOException
{
boolean passed = true;
System.out.println ("Connexion au serveur");
// open the database
int count = 0;
Class.forName("com.internetcds.jdbc.tds.Driver");
String url =
"jdbc:freetds:sqlserver://SERVER_NAME/DatabaseTest";
String user = "user";
String password = "password";
try
{
Connection cx = DriverManager.getConnection(url, user, password);
}
catch(java.sql.SQLException ex)
{
System.out.println("EXCEPTION2 : " + ex.getMessage());
ex.printStackTrace();
System.exit(1);
}
System.out.println (6);
System.out.println ("Connexion établie");
}
And i have an exception that i can't solve.
I wonder if i have a JDK problem.
Java console printing :
Connexion au serveur
EXCEPTION2 : null
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:177)
at t0001.main(t0001.java:33)
Can you help me ?
Thanks a lot for your response.
Laurent BRUYNOOGHE
Visit our new web site : http://www.compubase-europe.com !
e-mail:lbruynooghe AT compubase-europe.com
tel : 01 69 47 27 11
compuBase
8-10 rue du Bois Sauvage
91055 Evry FRANCE
-
coding problem or JDK problem,
Laurent BRUYNOOGHE, 02/23/2001
- <Possible follow-up(s)>
- RE: coding problem or JDK problem, Jeff Fisher, 02/23/2001
- Re: coding problem or JDK problem, Bob Kline, 02/23/2001
- RE: coding problem or JDK problem, Craig Spannring, 02/23/2001
Archive powered by MHonArc 2.6.24.