Good day everyone
I need to retrieve inserted OID for record inserted
Code:
public int createRecord(Record record) throws SQLException
{
String sql="insert into Record(name) values(?)";
PreparedStatement pstmt = con.prepareStatement(sql,
ResultSet.TYPE_SCROLL_INSENSITIVE,
ResultSet.CONCUR_UPDATABLE);
pstmt.setString(1, record.getName());
int row=pstmt.executeUpdate();
pstmt.close();
int OID=-1;//how to get inserted OID?
return (OID);
}
anyone who know please advise me, thanks in advance
