Make sure you've set up a System DSN on your NT box and not a User DSN.  This seems to have bitten a number of people on the list.
    (*Chris*)
 
----- Original Message -----
From: Pol Millan
Sent: Wednesday, December 08, 1999 1:16 AM
Subject: Servlets & databases a part

I know that this is a bit of off-topic question but it also involves servlet configuration so I go for it.
 
I've got these servlets seating on Apache for Linux and I've got a SQL Server database seating on NT.
 
I'd like the servlets to be able to talk to the database and I do the following:
 
      try
      {
        Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
      }catch(ClassNotFoundException e){System.out.println("Error "+e);}
      try
      {
        String surl="jdbc:odbc:147.403.167.4:1443/mydb";
        con=DriverManager.getConnection(surl);
        stmt=con.createStatement();
      }catch(SQLException e){System.out.println("Error "+e);}
Assuming that 147.403.167.4 is the IP address of the server where I've got SQL Server, that SQL Server listens on port 1443 and that mydb is a ODBC data source.
 
The message I get back says: 'Data source not found and no default driver specified'
 
What am I doing wrong?
 
Many thanks to everyone.
 
Pol Millan

Reply via email to