Click to See Complete Forum and Search --> : No suitable driver?
Dillinger4
May 30th, 2005, 01:18 PM
I have some code that i am using to connect to a database. The first couple of times i started the applet i was getting ClassNotfoundExceptions. I changed some suff in the autoexec.bat file but now it's changed to no suitable driver. Here's what i am using to create a new instance of the driver.
Class.forName("com.mysql.jdbc.Driver");
nebulom
May 30th, 2005, 07:46 PM
Did you get the driver from somewhere? You might also be setting the .jar into your classpath variable.
Dillinger4
May 30th, 2005, 08:07 PM
The driver was dl'ed straight from MySql's site. I had it installed properly before but i guess i had deleted it for some reason. Instead of setting the classpath to point to the .jar file i went the other route and extracted the .jar and set the claspath to point to com and org dirs.
System_Error
May 31st, 2005, 09:54 PM
I just read that "no suitable driver" meant that your drive was loaded sucessfully, but the URL syntax is incorrect. Maybe check the URL that your providing to the DriverMananger?
NoteMe
Jun 1st, 2005, 02:22 AM
jGuru.com is now a JupiterMedia page, so I dare to post a link to that page..:)
Here is a bunch of people having the same problem. And a lot of different things that went wrong. Go through the list and see if you have the same problem as one of them. Sorry for not having more help today..:)
http://jguru.com/faq/view.jsp?EID=391334
ии
Dillinger4
Jun 2nd, 2005, 07:08 PM
System_Error. Thanks for replying. I kinda had a hunch that the Driver was loaded because Clas.forName() didn't throw a ClassNotFoundException. Yes jguru is now under the control of JupiterMedia. I am the FAQ manager for the Thread, Network and Collections FAQ's. :eek:
System_Error
Jun 3rd, 2005, 07:09 AM
What's bad about JupiterMedia?
NoteMe
Jun 3rd, 2005, 08:53 AM
What's bad about JupiterMedia?
Nothing is bad about JM...everything is great with JM...but they don't like us to post links like this.
"I think jGuru can help. Take a look here [URL]"
if it is not a JM site...;)
ии
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.