Just wondering, but is the purpose of your query to retrieve a row id (or other information) immediately after it's inserted? If so there is a
getGeneratedKeys() command that will return the primary key of any records created by a statement. Of course support for this feature is system dependent so
test it out before assuming this works. The other approach to get the id of the keys recently inserted without relying on the database is to create the ids of the keys yourself (instead of using the database's key generation feature). In large enough systems where concurrency is an issue, this is often the best approach.
[ July 18, 2008: Message edited by: Scott Selikoff ]