Ranchers,
I feel silly for evening asking this question but here it goes.
I keep getting the following message:
CreateCoffees.java:50: cannot resolve symbol
symbol: method forName (java.lang.String)
location: class Class
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
^
Why???
/*
* @(#)CreateCoffees.java1.2 99/04/23
*/
import java.sql.*;
// Create the
Coffee Table.
public class CreateCoffees {
public static void main(
String args[]) {
String url = "jdbc

dbc:CafeJava";
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");
//Class.forName("C:\Program Files\JavaSoft\JRE\1.3\bin\Jdbc0dbc.dll");
} catch(java.lang.ClassNotFoundException e) {
System.err.print("ClassNotFoundException: ");
System.err.println(e.getMessage());
}
try {
con = DriverManager.getConnection(url,
"Admin", "duke1");
stmt = con.createStatement();
stmt.executeUpdate(createString);
stmt.close();
con.close();
} catch(SQLException ex) {
System.err.println("SQLException: " + ex.getMessage());
}
}
}