As you correctly say, last_insert_id is not supported by DBD::ODBC. The main reason for this is that there is no ODBC way to retrieve the last inserted ID. Each database and ODBC driver /may/ provide a way of obtaining it but support varies massively between databases and drivers (select @@identity, select myseq.currval from dual, insert ... returning, etc)

As others have pointed out there may be ways of obtaining the last inserted id with MS Access but it rather depends on the version of access you are using and access method. This highlights again, why DBD::ODBC does not do it.

If people want to send me SQL or other methods that work for different ODBC drivers and databases I will happily add them to the DBD::ODBC pod.

In reply to Re^2: Last Insert ID in MS Access by mje
in thread Last Insert ID in MS Access by greyhawk

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":