List:MySQL and Java« Previous MessageNext Message »
From:LEFEBVRE Cedric Date:March 31 1999 6:20am
Subject:Re: mysql & visual Java++ pro
View as plain text  
Here are some remarks and hints :

1/ Whatever GUI Builder you decide to use (even Visual J++) you use the jdk
(Java Development Kit). But usually you use by default jdk 1.1.6

2/ If you've read a bit about Java.sql, you know you need a JDBC driver to
connect to whatever Database.

3/ In fact, the ODBC driver is not the best driver choice and you should use
a special JDBC driver for Mysql. There are 2 of them :
a) The twz driver from Terrence W. Zeller
b) The mm driver from Mark Matthews (under GNU licence)
You can find them on http://www.tcx.se/Contrib/

If you use 1.1 Java, you have to include the <driver>.jar file in the
CLASSPATH.
If you use 1.2 Java, you can include the <driver>.jar file in the CLASSPATH
or copy it to <JavaInstallDir>\JRE\1.2\lib\ext (preferred)
Additionaly you have to load the driver in your database class by:
static {
try {
java.sql.DriverManager.registerDriver( new <driver.package.driverName>() );
}
catch ( ClassNotFoundException cnfE ) {
System.err.println("Couldn't load driver!!");
System.exit(1);
}
}
Also the URL "jdbc:odbc:wombat" will change to some driver specific one.

I hope this answers your questions

-
Cédric LEFEBVRE
Elève-ingénieur ENSEEIHT
Département Informatique et Mathématiques appliquées
Stagiaire chez Syntegra - Europe Informatique
cedric.lefebvre@stripped


Thread
mysql & visual Java++ proRoger Cooper31 Mar
  • Re: mysql & visual Java++ proADIB MOTIWALA31 Mar
    • Re: mysql & visual Java++ proHans Wolters31 Mar
Re: mysql & visual Java++ proRoger Cooper31 Mar
Re: mysql & visual Java++ proLEFEBVRE Cedric31 Mar
  • Re: mysql & visual Java++ proADIB MOTIWALA31 Mar
    • Re: mysql & visual Java++ proChristian Mack31 Mar
RE: mysql & visual Java++ proBrian Huddleston1 Apr