try {
con = DriverManager.getConnection("jdbc:odbc:dsn", "system", "hr");
cs=con.prepareCall("{call newteacherid(?,?,?)}");
cs.setString(1,teacherid.getText());
cs.setString(2,teacherid.getText());
cs.setInt(3,1);
cs.execute();
System.out.println("dfasfgasrg");
}
catch (SQLException ex) {
JOptionPane.showMessageDialog(null,"Invalid teacher ID","Error",JOptionPane.ERROR_MESSAGE );
Logger.getLogger(Administrator.class.getName()).log(Level.SEVERE, null, ex);
}
This entry was posted
on Saturday, November 22, 2008
at Saturday, November 22, 2008
and is filed under
java,
Programming
. You can follow any responses to this entry through the
comments feed
.