100 WCTME: Application Development and Case Study
st.executeUpdate("INSERT INTO CUSTOMERS VALUES( 'DI4F56' , 'Joel',
'Wickham', null)");
st.executeUpdate("INSERT INTO CUSTOMERS VALUES( 'XT345G' , 'Sid',
'Perera', null)");
st.executeUpdate("INSERT INTO CUSTOMERS VALUES( 'FT3H78' ,
'Guillermo', 'Villavicencio', null)");
st.executeUpdate("INSERT INTO CUSTOMERS VALUES( 'JK34S5' , 'Juan',
'Rodriguez', null)");
st.executeUpdate("INSERT INTO CONTRACTS VALUES('1', '374906' ,
'ITSO 4678', '" + Customer.PENDING + "', '?')");
st.executeUpdate("INSERT INTO CONTRACTS VALUES('2', 'GHJ453' ,
'ITSO 1982', '" + Customer.PENDING + "', '?')");
st.executeUpdate("INSERT INTO CONTRACTS VALUES('3', 'JW3G56' ,
'ITSO 329', '" + Customer.PENDING + "', '?')");
st.executeUpdate("INSERT INTO CONTRACTS VALUES('4', 'DI4F56' ,
'ITSO 6', '" + Customer.PENDING + "', '?')");
st.executeUpdate("INSERT INTO CONTRACTS VALUES('5', 'XT345G' ,
'ITSO 107', '" + Customer.PENDING + "', '?')");
st.executeUpdate("INSERT INTO CONTRACTS VALUES('6', 'FT3H78' ,
'ITSO 1245', '" + Customer.PENDING + "', '?')");
st.executeUpdate("INSERT INTO CONTRACTS VALUES('7', 'JK34S5' ,
'ITSO 11', '" + Customer.PENDING + "', '?')");
msg = "The CUSTOMERS and CONTRACTS tables have been successfully
created!";
} catch (SQLException sqlEx) {
System.out.println("SQL EXCEPTION: ERROR CODE: " +
sqlEx.getErrorCode());
sqlEx.printStackTrace();
msg = "The local tables were not successfully created!";
} finally {
try {
st.close();
con.close();
} catch (SQLException e1) {
}
}
}
System.out.println(msg);
return msg;
}
/* (non-Javadoc)