// Added by Nathan Folkert: /*********************************************************************** ** ** File: /afs/ir/users/c/j/cjurney/public/cs145/SQLLoader.java ** ** Author: Craig Jurney, ITSS ** ** Written: April, 2000 ** ** Classes: SQLLoader ** ** Description: Simple template class used for loading a single table. ** ** Maintenance: ** 04/10/00 cjurney Initial version ** **---------------------------------------------------------------------- ** Copyright (c) 2000 Board of Trustees, Leland Stanford Jr. University ************************************************************************/ import java.sql.*; public class SQLLoader { public static String USERNAME = new String("yourname"); public static String PASSWORD = new String("yourpasswd"); public static void main(String[] args) throws ClassNotFoundException { // Load the Oracle Driver Class.forName("oracle.jdbc.driver.OracleDriver"); try { // Get a connection from the connection factory Connection con = DriverManager.getConnection( "jdbc:oracle:thin:@dbaprod1:1521:SHR1_PRD", USERNAME, PASSWORD); // Show some database/driver metadata SQLUtil.printDriverInfo(con); // Create a Statement object so we can submit SQL statements to the driver Statement stmt = con.createStatement(); // Submit the statement for (int i=0; i