G
Guest
In Access, an autonumber is generated as soon as you change any field of
the record whereas SQL Server doesn’t set the autonumber until the record is
saved. In multiple places in my code, I use the Addnew method to create a
new record, set the value of a field (for example RS!VendorName = “Altekâ€),
and then, right after setting the value of the first field, save the
autonumber value to a variable for future use. How can I access the value of
a new record's autonumber field for a recordset made from a SQL Server table?
I tried to access the autonumber value after I issued the update method to
the recordset, but the focus is set to the first record of the table after an
update, and I get whatever the autonumber of the first record is.
the record whereas SQL Server doesn’t set the autonumber until the record is
saved. In multiple places in my code, I use the Addnew method to create a
new record, set the value of a field (for example RS!VendorName = “Altekâ€),
and then, right after setting the value of the first field, save the
autonumber value to a variable for future use. How can I access the value of
a new record's autonumber field for a recordset made from a SQL Server table?
I tried to access the autonumber value after I issued the update method to
the recordset, but the focus is set to the first record of the table after an
update, and I get whatever the autonumber of the first record is.