in reply to Finding last inserted id through DBI

If I assume you want to use the value to insert a new row, I would go for something like (pseudo code):
# Reset number of tries $trycount=0; { # Increase number of tries $trycount++; # Make sure we don't try forever last if ($trycount > 10) # Put last id + 1 in $id SELECT MAX(id)+1 FROM table; # Try to insert new row and check for errors INSERT INTO table (id,col1,coln) VALUES ($id,$col1,$coln); # Try again redo if (error eq "Unable to insert due to duplicate values"); } # Handle too many tries die "Too many tries" if ($trycount > 10);
The things you need to know is the key (id) of the table and how DBD:ODBC reports a failure to insert because a row is already there (someone else was faster).

/brother t0mas