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
posted
0
Hi Dana,
The answer depends on which MySql driver you're using.
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://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.