P is for Practical | |
PerlMonks |
Re^2: Last Insert ID in MS Accessby james2vegas (Chaplain) |
on Jul 17, 2010 at 07:29 UTC ( [id://850070]=note: print w/replies, xml ) | Need Help?? |
This article suggests that the correct syntax is SELECT @@IDENTITY, and that you should open a second connection to get it. This is presumably problematic with multiple users, so it is as effective (and unreliable) as MAX(ID) would be. I think you could probably lock the table for update and unlock the table after getting the last id.
In Section
Seekers of Perl Wisdom
|
|