I am not sure if this might help you.
 
I had this problem too.  However I was running Apache also on NT.  It doesnt work if you specify the server IP. Try giving in the DataSource Name for the SQL Server sitting on NT, instead of the ServerIP.
 
Regards,
Pradeep.
-----Original Message-----
From: A mailing list for discussion about Sun Microsystem's Java Servlet API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of Pol Millan
Sent: Wednesday, December 08, 1999 2:47 PM
To: [EMAIL PROTECTED]
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