Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

applet mysql access

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 823
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic