Java APIs, Extensions and Libraries by Kishori Sharan

Java APIs, Extensions and Libraries by Kishori Sharan

Author:Kishori Sharan
Language: eng
Format: epub, pdf
Publisher: Apress, Berkeley, CA


// Need to get dob in java.sql.Date object

Date dob = Date.valueOf("1970-01-01");

// Insert two person records

insertPerson(pstmt, 401, "Sara", "Jain", "F", dob, 0.0);

insertPerson(pstmt, 501, "Su", "Chi", "F", null, 10000.0);

// Commit the transaction

JDBCUtil.commit(conn);

System.out.println("Updated person records successfully.");

} catch (SQLException e) {

System.out.println(e.getMessage());

JDBCUtil.rollback(conn);

} finally {

JDBCUtil.closeStatement(pstmt);

JDBCUtil.closeConnection(conn);

}

}



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.