Simple java/jdbc/oracle example program using oracle's thin client. The driver name I have added to my classpath
class111.zip.
<code>
import java.sql.*;
public class CreateCoffees {
public static void main(
String args[]) {
String url = "jdbc

racle:thin:@127.01.01:1521:SID";
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("oracle.jdbc.driver.OracleDriver");
}
catch(java.lang.ClassNotFoundException e) {
System.err.print("ClassNotFoundException: ");
System.err.println(e.getMessage());
}
try {
con = DriverManager.getConnection(url,"USERID", "PASSWORD");
stmt = con.createStatement();
stmt.executeUpdate(createString);
stmt.close();
con.close();
}
catch(SQLException ex) {
System.err.println("SQLException: " + ex.getMessage()); }
}
}
</code>
hope this helps ...
------------------
Multi-Platform Database Developer ( on E.S.T. )
[This message has been edited by Monty Ireland (edited April 12, 2001).]