java.sql.SQLException: No suitable driver help
843854Sep 2 2003 — edited Sep 3 2003Hi everybody....
I'm trying to do (and learn)something new in JDBC: a bridge between JDBC and ODBC.
For easy, I use the MSAccess ODBC (for proof only -by now-) in Windows 2000.
The problem is: When I run my java code using the appletviewer the applet runs very well, but when I run it inside the IE 5.0 the exception catchs this: "java.sql.SQLException: No suitable driver".
I think could be the CLASSPATH or PATH but �'m not so sure.
Could any one help me?...
The code I use is:
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver").newInstance();
String dbUrl = "jdbc:odbc:test"; // ODBC exists in ODBC system
Connection conn = DriverManager.getConnection(dbUrl);
Statement stmt = conn.createStatement();
String sql = "Select * from MASTER where ID_master = 'USER'";
ResultSet results = stmt.executeQuery(sql);
while(results.next()){
id.setText( results.getString(1));
}
}
catch ( Exception e ) {
nombre.setText("error:" + e);}
}
P.D. I have knowledge an documentation about JDBC in AS/400 if any one want it....
Regards