
November 23rd, 2003, 08:52 AM
|
|
Junior Member
|
|
Join Date: Nov 2003
Posts: 5
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
JDBC - executeUpdate and auto-incrementing keys
Hiya all,
Here's a problem I've been wrestling with... I've got a table where the key is auto-incrementing - so when I add a new record to the table I can leave out the key, and a unique key is automatically created for me.
However, if from Java I use the java.sql.Statement.executeUpdate - how do I get a handle on the record I've just created? In some cases I could use the other values to search for the record, but in come cases the key is the only uniquely identifying property of that record...
Maybe this is a design issue, and I've got something wrong here... any help would be appreciated.
Bunny
|