in reply to Last Insert ID in MS Access

...but I need to be able to get the (autogenerated) ID of the last record inserted and I can't seem to find any way to do it.

Do you really? Why?

Replies are listed 'Best First'.
Re^2: Last Insert ID in MS Access
by Anonymous Monk on Nov 19, 2015 at 03:56 UTC
    $idSQL = 'SELECT @@IDENTITY AS lastID'; $stmtID = $conn->prepare($idSQL); $stmtID->execute(); $row = $stmtID->fetch(); echo "Last insert ID is: " . $row["lastID"];