Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Statement stmt = conn.createStatement();
- try {
- stmt.executeUpdate( "INSERT INTO MyTable( name ) VALUES ( 'my name' ) " );
- } finally {
- //It's important to close the statement when you are done with it
- try { stmt.close(); } catch (Throwable ignore) { /* Propagate the original exception
- instead of this one that you may want just logged */ }
- }
Advertisement
Add Comment
Please, Sign In to add comment