As for my email address. I use may computers to access the net.
Each computer uses a different way to access the net.
Becaues of this. I try to keep my email addres private to avoid
junk mail.
Thanks for pointing this out to me. I will include my signature in future posts. Now for the good stuff!
Sample
java jdbc code was obtain at Sun's web sight.
www.java.sun.com.products.jdbc.book.html The code that follows. Is one of there sample programs that has
been modified to access a ms-access 2.0 database. So you will have to do the ODBC setup yourself. The ms-access data source name I use is
accessDB.
<code>
import java.sql.*;
public class CreateCoffees {
public static void main(
String args[]) {
String url = "jdbc:odbc:accessDB";
Connection con;
String createString;
createString = "create table COFFEES " +
"(COF_NAME varchar(32), " +
"SUP_ID int, " +
"PRICE float, " +
"SALES int, " +
"TOTAL int)";
Statement stmt;
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
}
catch(java.lang.ClassNotFoundException e) {
System.err.print("ClassNotFoundException: ");
System.err.println(e.getMessage());
}
try {
con = DriverManager.getConnection(url, "", "" );
stmt = con.createStatement();
stmt.executeUpdate(createString);
stmt.close();
con.close();
} catch(SQLException ex) {
System.err.println("SQLException: " + ex.getMessage());
}
}
}
</code>
Good-Luck...
Hope This Helps
Monty6
------------------