This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "No suitable driver" Watch "No suitable driver" New topic

No suitable driver

Matt Dillion

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,
Ranch Hand

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

[ June 11, 2002: Message edited by: Rene Larsen ]
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 ?