Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2003
    Posts
    2

    Exclamation Unanswered: JDBC Driver problem using applet

    Hi people!

    This is my first time posting in a forum, so be gentle...

    I have a problem with an applet I'm supposed to edit, so that it searches an nuclear database..

    The problem I have is, that when I try to load a drive with Class.forName("Driverblablablalba"), it doesn't work..

    Now I've tested loading the driver and getting stuff from the database when it's pure Java and it works fine.. But when I try in the applet to load the driver it just fails..

    Does anybody know what could affect this?

    I could post the code, but it's such an extensive project that probably only some people who've used Java a lot could tell me what the problem is..

    I've tried with the JDBC - ODBC Bridge and now I'm trying a pure java JDBC type 3 driver..

    Thank you for your help in advance..

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1

    Re: JDBC Driver problem using applet

    Originally posted by jokekamu

    The problem I have is, that when I try to load a drive with Class.forName("Driverblablablalba"), it doesn't work..

    Now I've tested loading the driver and getting stuff from the database when it's pure Java and it works fine.. But when I try in the applet to load the driver it just fails..
    This might have been caused by the applet security mechanism. I believe applets are only allowed to load code from the same url where the applet code has been loaded from. Try putting the JAR file containing the driver into the same directory where you have the applet code.

    You can run into another problem, by the way: because of security restrictions applets can only establish socket connections with their original hosts. If your database is not the same server as the applet source server the JDBC connection attempt will fail.
    ---
    "It does not work" is not a valid problem statement.

  3. #3
    Join Date
    Nov 2003
    Posts
    2

    well.. thanx, but ...

    Well, thanx for trying, I mean it sounded like a possibility, but unfortunately it just didn't work like that eather..

    Thanks, anyways..

Posting Permissions

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