This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes JDBC and Relational Databases and the fly likes No suitable driver Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Databases » JDBC and Relational Databases
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 ]
I agree. Here's the link:
subject: No suitable driver
It's not a secret anymore!