It's not a secret anymore!*
The moose likes JDBC and the fly likes No suitable driver Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "No suitable driver" Watch "No suitable driver" New topic
Author

No suitable driver

Matt Dillion
Greenhorn

Joined: Jun 11, 2002
Posts: 1
I've ran this before and I know it works. It's been awhile since I done some Java (I work in VB at work, and only get to use Java in my free time). Can anyone point out what went wrong? Did I change something that I shouldn't have?
Here's my output:
Getting driver sun.jdbc.odbc.JdbcOdbcDriver . . . Success.
Getting connection d:\Java\Nomey\data\Nomey.mdb . . . Failed.
No suitable driver

Here's my code:

Thanks for your help with a novice.
[ Edited by Dave to format code ]
[ June 11, 2002: Message edited by: David O'Meara ]
lavanya subramanian
Ranch Hand

Joined: Nov 03, 2000
Posts: 52
Hi Matt,

try registering the driver atleast once before u attempt to get a connection before the class.forName()
DriverManager.registerDriver("your diver name");
i think this would help,
Lavanya
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Hi
What is your URL?
The URL should be "jdbcdbc:<ODBC ALIAS>"

/Rene
[ June 11, 2002: Message edited by: Rene Larsen ]
 
wood burning stoves
 
subject: No suitable driver
 
Similar Threads
Help with "unable to connect to database" problem
Hi,I have a problem in database connection
Kindly help with the "cannot connect to the database" error
Database Connection
How to use DBCP with JNDI ?