Results 1 to 8 of 8

Thread: No suitable driver?

  1. #1

    Thread Starter
    Dazed Member
    Join Date
    Oct 1999
    Location
    Ridgefield Park, NJ
    Posts
    3,418

    No suitable driver?

    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.
    Code:
    Class.forName("com.mysql.jdbc.Driver");

  2. #2
    Fanatic Member
    Join Date
    Jan 2005
    Location
    Cebu
    Posts
    607

    Re: No suitable driver?

    Did you get the driver from somewhere? You might also be setting the .jar into your classpath variable.

  3. #3

    Thread Starter
    Dazed Member
    Join Date
    Oct 1999
    Location
    Ridgefield Park, NJ
    Posts
    3,418

    Re: No suitable driver?

    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.

  4. #4
    Frenzied Member System_Error's Avatar
    Join Date
    Apr 2004
    Posts
    1,111

    Re: No suitable driver?

    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?

  5. #5
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190

    Re: No suitable driver?

    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


    ØØ

  6. #6

    Thread Starter
    Dazed Member
    Join Date
    Oct 1999
    Location
    Ridgefield Park, NJ
    Posts
    3,418

    Re: No suitable driver?

    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.

  7. #7
    Frenzied Member System_Error's Avatar
    Join Date
    Apr 2004
    Posts
    1,111

    Re: No suitable driver?

    What's bad about JupiterMedia?

  8. #8
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190

    Re: No suitable driver?

    Quote Originally Posted by System_Error
    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...


    ØØ

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width