I can't see any reason why you can't do what you are trying to do, I have
used User DSN's with Servlets, ODBC and Access without any trouble at all....
All I can think of to try is a different JDK release. I used 1.1.7 and
1.1.8 on different occasions successfully.
Else, try
con = DriverManager.getConnection(url, "", "");
instead of 'DriverManager.getConnection(url)'
Assuming that there are no user names / passwords asscociated
with the data source. As far as I am aware the username and password options
are NOT optional so you have to supply empty strings even if there are
no access restrictions.
Sorry I didn't reply to this thread earlier, I didn't
immediately spot the possible problems.
William. Hope that helps.
Chris Pratt wrote:
Java Applications can run with User
DSN's, but Servlet's can't (*Chris*)
----- Original Message -----
Sent: Thursday, November 04, 1999
3:22 AM
Subject: Re: Problems between JDBC
and Servlets
I'm sure that i've got one, moreover
it runs well in a java application.
----- Original Message -----
Sent: Thursday, November 04, 1999
10:40 AM
Subject: Re: Problems between JDBC
and Servlets
Make sure you have a System DSN set up in the ODBC Control panel,
not a user DSN. (*Chris*)
----- Original Message -----
Sent: Thursday, November 04, 1999
12:56 AM
Subject: Problems between JDBC and
Servlets
Hi ,My
name 's Ben ,I'm a French student and I've got a real problem with a servlet
and JDBC.This is a part
of my source that seems to be good but occurs ERRORS !!! : public
boolean dbconnect(){try{
Connection Connect;
String url="jdbc:odbc:pwd";
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connect=DriverManager.getConnection(url);
return true;}catch(ClassNotFoundException
e){
System.out.println("CNFE");
return false;}
catch(SQLException e){
System.out.println("sqlExcept....."+e.toString());
return false;}} The
error message is : java.sql.SQLException:
[Microsoft][Pilote ODBC Access 97 ODBC driver]Erreur générale
Impossible d'ouvrir la clé de registre 'DriverId'. (means)->General
Error can't open 'DriverId' register key. Sending
me a short mail about this message would be really helpfull for me.Thank
you for all. Ben.
|