A quick rundown of my code is:
$dsn = "driver=Microsoft Access Driver (*.mdb);dbq=main.mdb";
$dbh = DBI->connect("DBI:ODBC:$dsn","","");
$sth = $dbh->prepare( "INSERT INTO Table VALUES ($v1,$v2)");
$sth->execute;
Troy
> From: Michael Peppler [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 21, 2002 2:24 PM
> To: Troy Sniff
> Cc: [EMAIL PROTECTED]
> Subject: Re: Returning auto incremented value on insert
>
>
> Troy Sniff writes:
> > I am performing an insert into an access table where the
> primary key is
> > set to auto increment.
> >
> > When I insert a record, is there an easy way to grab the
> value created
> > by the auto increment without having to go back in read the newly
> > created record?
>
> Depends entirely on the database server you use, and the DBD module
> used to access it.
>
> Michael
> --
> Michael Peppler Data Migrations, Inc.
> [EMAIL PROTECTED] *or* [EMAIL PROTECTED]
> http://www.mbay.net/~mpeppler
> International Sybase User Group: http://www.isug.com
>
>