File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes applet mysql access Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "applet mysql access" Watch "applet mysql access" New topic
Author

applet mysql access

Anonymous
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.

    Regards

    Jules
     
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: applet mysql access
     
    Similar Threads
    How to put JDBC driver in applet jar?
    JDBC in Applets, problems
    Problem using mysql jdbc driver in an applet.
    Enabled Web start in NetBeans, but lost database connection
    JApplet in Browser : Connection Problem