You should try inserting the record with the next syntax: INSERT INTO table (fieldname1,fieldname2) VALUES (fieldname1value,fieldname2value)
This way you can ignore the Autonumber field... For the second question, an option could be having a timestamp field on the table you want and then, making a select ordered by the timestamp field in descending order. This should make it possible to retrieve the last inserted record's id. > -----Mensaje original----- > De: Greg Sohl [mailto:[EMAIL PROTECTED]] > Enviado el: miércoles, 21 de noviembre de 2001 15:18 > Para: [EMAIL PROTECTED] > Asunto: [PHP-WIN] ODBC to Access with Autonumber Field > > > Hi, > > Does anyone have an example of Inserting a record to a table in an Access > database where one of the fields is an Autonumber field, and most > importantly, retrieving the value of the newly inserted Autonumber field? > I'm looking for the equivilant of mysql_insert_id() for ODBC. Thanks. > > Greg Sohl > Cedar Rapids, IA > > > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]