Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

No suitable driver

 
Matt Dillion
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
What is your URL?
The URL should be "jdbcdbc:<ODBC ALIAS>"

/Rene
[ June 11, 2002: Message edited by: Rene Larsen ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic