private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
//GEN-FIRST:event_jButton1ActionPerformed
try {
Class.forName("oracle.jdbc.driver.OracleDriver");
JOptionPane.showMessageDialog(null, "Class Loaded");
Connection conn = DriverManager.getConnection("jdbcracle:thinlocalhost:1521:xe", "midos", "mido");
JOptionPane.showMessageDialog(null, "connection Succeded");
PreparedStatement stmt=conn.prepareStatement("insert into empl(id ,name,salary) values('"+t_id+"','"+t_name+"','"+t_Sal+"')");
int c= stmt.executeUpdate();
if (c>0)JOptionPane.showMessageDialog(null, "Data Updated");
conn.close();
} catch (ClassNotFoundException e) {
} catch (SQLException e) {
}
}
//GEN-FIRST:event_jButton1ActionPerformed
try {
Class.forName("oracle.jdbc.driver.OracleDriver");
JOptionPane.showMessageDialog(null, "Class Loaded");
Connection conn = DriverManager.getConnection("jdbcracle:thinlocalhost:1521:xe", "midos", "mido");
JOptionPane.showMessageDialog(null, "connection Succeded");
PreparedStatement stmt=conn.prepareStatement("insert into empl(id ,name,salary) values('"+t_id+"','"+t_name+"','"+t_Sal+"')");
int c= stmt.executeUpdate();
if (c>0)JOptionPane.showMessageDialog(null, "Data Updated");
conn.close();
} catch (ClassNotFoundException e) {
} catch (SQLException e) {
}
}