JAVA database access
- Download the JDBC driver (contains the classes for the connection ie driver). (I could get more recent updates and try them out).
- MM.MySQL x.x.x Mark Matthews JDBC Driver for MySQL Copyright (c) 1998-2000 Mark Matthews
- download version 1.2b (type 4 driver) mm.mysql.jdbc-1.2b (Type IV JDBC driver for MySQL. Small (<120K), high performance, LGPL.) (http://www.worldserver.com/mm.mysql/).
- There are newer releases that come in JAR files.(not yet loaded or tried)
- There is also a driver on the mysql website: JDBC mm.mysql.jdbc-1.2c.tar.gz . (http://web.mysql.com/Contrib/) The mm JDBC driver for MySQL. This is a production release and is actively developed. By Mark Matthews (firstname.lastname@example.org).
- Set the CLASSPATH which I do in the xxx.bat files using the classpath argument. (e:\jdk1.2.2\bin\javac -classpath "e:\java from C\javaklg;e:\mm.mysql.jdbc-1.2b" *.java)
- builld a java class: ConnectSQL.java
- dBConnection = DriverManager.getConnection(dBServer, dBUser, dBPassword);
- rs = stmt.executeQuery("SELECT * from tableA");
The class ConnectSQL.java works and returns field in the database.
NOTE: I made sure that the password for the users account had 8 characters. In the process of making this work I discovered that this was a problem with the release that I have.