D
Dave Rudolf
Hey all,
I have an ADO DC (in Visual Basic 6) that is connected to an Access '97 MDB
file via an ODBC driver. The DC's record source is set to a table in this
database that has a integer key field that is automatically generated (i.e.,
each new record increments some counter and uses that value as its key). Now,
when I do an AddNew call on the ADODC's record set, it obviously doesn't know
the value that the database is going to use and thus that field is "Empty". If
I then call Update on that record set, the field always returns 0, no matter
what value the database has assigned to that field. I want to know what key
value was assigned to that record.
To complicate things, that key field is the only thing that is unique about
the records in the table. Since I have no idea what it is, I can't just tell
the ADODC to Refresh and then search for the newly added record. Is there some
other way to get the record set to figure out what key value is?
Thanks
Dave
I have an ADO DC (in Visual Basic 6) that is connected to an Access '97 MDB
file via an ODBC driver. The DC's record source is set to a table in this
database that has a integer key field that is automatically generated (i.e.,
each new record increments some counter and uses that value as its key). Now,
when I do an AddNew call on the ADODC's record set, it obviously doesn't know
the value that the database is going to use and thus that field is "Empty". If
I then call Update on that record set, the field always returns 0, no matter
what value the database has assigned to that field. I want to know what key
value was assigned to that record.
To complicate things, that key field is the only thing that is unique about
the records in the table. Since I have no idea what it is, I can't just tell
the ADODC to Refresh and then search for the newly added record. Is there some
other way to get the record set to figure out what key value is?
Thanks
Dave