I'm inserting records into a database table using ESQL, the database has a primary id with autoincrement. I need to find the newly created id of the new record, is there a way to do this on MSSQL2000 from ESQL? (Doing a select on max(id) won't do because of the possiblity of race conditions.) I've done similar things in php on mySQL, there I could use last_insert_id(), but how to do the same with SQL2000 and ESQL? Rune --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. <http://xml.apache.org/cocoon/faqs.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>