I'm trying to get the autonumber of a record I just inserted into an Access database. Here's the code I'm using. I don't seem to be getting anything back and it doesn't seem to return an error, either.
my $sth1 = $dbh->prepare("select max(REQUESTNUMBER) from request_data");
$sth1->execute;
$error = $sth1->errstr;
my $id = $sth1->fetchrow_hashref();
$error = $sth1->errstr;
my $requestnumberid = $id{'REQUESTNUMBER'};
Requestnumber is the autonumber field. Any suggestions?
my $sth1 = $dbh->prepare("select max(REQUESTNUMBER) from request_data");
$sth1->execute;
$error = $sth1->errstr;
my $id = $sth1->fetchrow_hashref();
$error = $sth1->errstr;
my $requestnumberid = $id{'REQUESTNUMBER'};
Requestnumber is the autonumber field. Any suggestions?