aspose file tools*
The moose likes JDBC and the fly likes Class.forName Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Class.forName" Watch "Class.forName" New topic


Philip Pross
Ranch Hand

Joined: Jan 17, 2001
Posts: 76
I'm presently learning JDBC, I've done alot of examples for applications, as soon as I turned towards working with applets local in my pc (appletviewer), I've had problems.
I've study the tutorials on the web, and even with this example I found I'm getting errors.
The error is in the try ..... Class.forName
catch(Exception ex)
setError("Can't find Database driver class: " + ex);
Has anyone seen this before?
Jamie Robertson
Ranch Hand

Joined: Jul 09, 2001
Posts: 1879

I've heard of some databases being 'picky' as to having '.newInstance()' tagged on to the end of the Class.forName method. try:
-->doesn't have the newInstance() method at end.
I agree. Here's the link:
subject: Class.forName
Similar Threads
retrieve an interface in runtime
Connecting to Excel
SQL Server DSN - JdbcOdbcDriver
Trying again: SQLException: No suitable driver
jasperreports does not work in executable jar file