hello
Is this String from my properties sheet able to become a prepared Statement. is the syntax compatable?
[b]if the string from properties is i=0 for the array [/b]
private boolean createTables(Connection conn) {
for (int i = 0; i < schoolofdbTables.length; i++) {
boolean bCreatedTables = false;
PreparedStatement ps = null;
try {
ps = (PreparedStatement) conn.prepareStatement(
ModelUtils.getResource(schoolofdbTables[i]));
ps.executeQuery();
bCreatedTables = true;
} catch (SQLException ex) {
ex.printStackTrace();
}
}
return bCreatedTables;
}
strCreateInstructorTable = \
CREATE TABLE instructor \
( \
instr_uid CHAR(11),\
instr_password CHAR(11),\
instr_lname CHAR(20),\
instr_mname CHAR(20),\
instr_fname CHAR(20),\
instr_gender CHAR(1),\
instr_start_date DATE,\
instr_end_date DATE,\
instr_age INT(3),\
instr_address CHAR(20),\
instr_state CHAR(2),\
instr_zip INT(5),\
instr_area_code INT(3),\
instr_phone INT(11),\
instr_location CHAR (11),\
instr_rate INT(4),\
instr_pay_rate INT(4),\
book_num INT(6),\
PRIMARY KEY(instr_uid) \
)\
INSERT INTO instructor \
(instr_uid,\instr_fname,\instr_password) VALUES ('ij','Johanne','i') \
INSERT INTO instructor \
(instr_uid,\instr_fname,\instr_password) VALUES ('im','Mozart','i')
the key: strCreateAdminTable
Exception in thread "main" java.util.MissingResourceException: Can't find resource for bundle java.util.PropertyResourceBundle, key strCreateAdminTable
at java.util.ResourceBundle.getObject(ResourceBundle.java:384)
at java.util.ResourceBundle.getString(ResourceBundle.java:344)
at model.ModelUtils.getResource(ModelUtils.java:48)
at model.dao.ConnectDerbyDAO.createTables(ConnectDerbyDAO.java:179)
Thanks