in reply to Re: Re: A Question on ADO and a comment on Microsoft
in thread A Question on ADO and a comment on Microsoft

Easy with mysql:

$dbh->do('insert mumble'); my $id = $dbh->{'mysql_insertid'};

a bit harder with sql server through odbc:

$dbh->do("set nocount on"); # so it works on SQL Server 6.5 too my $sth = $dbh->prepare( "insert mumble SELECT @@IDENTITY ID"); $sth->execute; my $id = $sth->fetchrow_arrayref->[0]; $sth->finish; $dbh->do("set nocount off");

You may find that access has enough in common with sql server to accept this syntax. I couldn't find any conclusive information either way.