File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes applet mysql access Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "applet mysql access" Watch "applet mysql access" New topic

applet mysql access

Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
I don't really understand how applet/mysql connectivity works. Is it simply a matter of importing a driver package into the applet or is there a separate part that works as an intermediary between the applet and mysql that must be installed?
Julian Kennedy
Ranch Hand

Joined: Aug 02, 2004
Posts: 823
Hi Dana,

The answer depends on which MySql driver you're using.

There are four categories of JDBC driver:

  • Type 1 drivers provide a JDBC/ODBC bridge
  • Type 2 drivers are part native, part Java and are typically the high performance drivers that we use for server-side database programming
  • Type 3 drivers are all Java and use a Net protocol
  • Type 4 drivers are all Java and use a native protocol

  • Type 3 drivers are typically the most useful for Applets as they can be downloaded dynamically from the web server and loaded by the JVM on the fly.

    When you use a JDBC driver in your code you only need to load it using Class.forName("com.whatever.jdbc.myDriver"). You will, of course, need to import any classes that you use from the java.sql package.

    If you use a type 3 driver for your MySql connection, the client machine does not need any special software configuration to run your code.

    I hope this helps to clarify things for you.


    I agree. Here's the link:
    subject: applet mysql access
    It's not a secret anymore!