How to retrieve the Identity/auto_increment fireld after an insert in MYSQL

I have a table in MYSQL 5.0 with an auto_increment key. I can insert records into the table with no problems, but how do I know what the generated key is?Thanks for any help,Keith
[200 byte] By [sitara] at [2007-11-26 7:45:52]
# 1
Hi,Can you be more precise? After inserting a records into the database the auto_increment field will be filled in automatically by mysql.When you run a SELECT * FROM <tablename> it will show up. If it shows up as 0 you forgot to refresh the dataprovider.
bami at 2007-7-6 19:58:15 > top of Java-index,Development Tools,Java Tools...
# 2
For MySQL, you could try "SELECT LAST_INSERT_ID()".Best regards.Antonio.
antoniovl at 2007-7-6 19:58:15 > top of Java-index,Development Tools,Java Tools...
# 3
Thanks for the input. "SELECT LAST_INSERT_ID()" or "mysql_insert_id()" is what I'm looking for. I am using a Cached Rowset Data Provider and was hoping to avoid using DBMS-specific functionality. I thought that JSC might provide a method to get the insert_id but couldn't find it.
sitara at 2007-7-6 19:58:15 > top of Java-index,Development Tools,Java Tools...
# 4
I remember reading in this Creator guy's blog that they don't do it.It's somewhere within http://blogs.sun.com/roller/page/jfbrown?catname=%2FCreator
TubahBrown at 2007-7-6 19:58:15 > top of Java-index,Development Tools,Java Tools...