The information in this article applies to:
SYMPTOMSIf you bind a server-side Recordset DTC to a table or query that has an ID (AutoNumber) field as part of the primary key, an attempt to insert a new record with addImmediate() after round-tripping the page may fail. This typically happens when inserting records with some type of Active Server Pages (ASP) data form. Similarly, if you are using addRecord() and updateRecord() to insert new records, you could run into this bug if you call updateRecord() and then addRecord() on the same round-trip. CAUSEWhen you insert a new record into a table or query that has an ID (AutoNumber) field as part of the primary key, the value of the primary key for the new record is unknown at the time of insertion. Therefore, the Recordset cannot be returned to the current record when you round-trip the page, and the Recordset is flagged as "non-updateable" to safeguard against modifying an unknown record. If you then try to update the recordset or add a new record, the operation will fail. RESOLUTIONOne simple workaround for this problem is to call the requery() method of the Recordset DTC after you insert a new record. This will ensure the Recordset is updateable when you round-trip the page. In the case where you are using addRecord() and updateRecord() to insert new records, you should call the requery() method after calling updateRecord(). STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this bug and will post new information here in the Microsoft Knowledge Base as it becomes available. MORE INFORMATIONSteps to Reproduce Behavior
Keywords : kbVisID600bug kbGrpASP |
Last Reviewed: May 6, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |