Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

java.sql.SQLException: No suitable driver help

843854Sep 2 2003 — edited Sep 3 2003
Hi 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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 1 2003
Added on Sep 2 2003
5 comments
98 views