Determining autonumber field value 
Author Message
 Determining autonumber field value

With the various updates to ADO, does anyone know if Microsoft has added the
ability of determining the value of the autonumber field after inserting a
record (short of executing a separate query against the database)?  As I
recalled, this weakness was one of the complaints when Microsoft first
released ADO.

That is, after the executing the code snippet:
               rsJob.AddNew
               ' initialize fields here
                    . . .
               rsJob.Update

is there a way of determining the value assigned to the autonumber field?

TIA,

Richard L Rosenheim



Sun, 30 Nov 2003 08:59:13 GMT  
 Determining autonumber field value
set the Recordset.Properties("Update Resync") = adResyncAutoIncrement



Quote:
> With the various updates to ADO, does anyone know if Microsoft has added
the
> ability of determining the value of the autonumber field after inserting a
> record (short of executing a separate query against the database)?  As I
> recalled, this weakness was one of the complaints when Microsoft first
> released ADO.

> That is, after the executing the code snippet:
>                rsJob.AddNew
>                ' initialize fields here
>                     . . .
>                rsJob.Update

> is there a way of determining the value assigned to the autonumber field?

> TIA,

> Richard L Rosenheim



Sun, 30 Nov 2003 09:49:41 GMT  
 Determining autonumber field value
Hi,

Quote:
> With the various updates to ADO, does anyone know if Microsoft has added
the
> ability of determining the value of the autonumber field after inserting a
> record (short of executing a separate query against the database)?  As I
> recalled, this weakness was one of the complaints when Microsoft first
> released ADO.

> is there a way of determining the value assigned to the autonumber field?

It depends now on the cursor type and cursor location and provider. But you
can get autofield values when using SQL Server and Access very easy.

Sebastian



Sun, 30 Nov 2003 14:08:09 GMT  
 Determining autonumber field value
Thanks for the replies.

Richard L Rosenheim



Tue, 02 Dec 2003 00:45:04 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Determining autonumber field value

2. Determining Autonumber value after INSERT

3. Determining Autonumber value after INSERT

4. Determining which is the IDENTITY or AutoNumber field using OpenSchema

5. Autonumber field -- need way yo determine last record added

6. Determining which is the IDENTITY or AutoNumber field using OpenSchema

7. Inserting values into an autonumber field

8. Field Type AutoNumber and pre-setting value

9. Second Post: Field Type AutoNumber and pre-setting Start value

10. Why is it unable to retrieve the value of an autonumber field

11. Getting an autonumber field value after inserting with ADO

12. Inserting values into an autonumber field

 

 
Powered by phpBB® Forum Software