Microsoft KB Archive/190768

= BUG: Error Calling Some Methods from OnDatasetComplete =

Article ID: 190768

Article Last Modified on 3/2/2005

-

APPLIES TO


 * Remote Data Service for ADO 2.0
 * Microsoft Remote Data Services 2.1
 * Remote Data Service for ADO 2.5
 * Remote Data Service for ADO 2.6

-



This article was previously published under Q190768



SYMPTOMS
When calling certain recordset methods from the ondatasetcomplete event handler for that recordset, a run-time error message will appear that states, "RDS has made an event call back to the consumer and has not yet returned."



CAUSE
Certain methods that may alter the data in a recordset are not allowed from the ondatasetcomplete event handler.



RESOLUTION
Do not attempt to make changes to the recordset until the event handler has returned. One way to delay making changes is with the setTimeout method of the window object, for example: window.setTimeout("myRS.addImmediate(fields, values)", 10)



STATUS
Microsoft 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 INFORMATION
Methods that are not allowed in an ondatasetcomplete event handler because they change the recordset are: addImmediate, addRecord, deleteRecord, requery, updateRecord.

Steps to Reproduce Behavior

 * 1) Open a new HTML page from a Web project with a data connection.
 * 2) In Source view, drag a RecordsetDTC from the Toolbox onto the page.
 * 3) Double-click the "Client Objects & events\Recordset1\ondatatasetcomplete" node of the Script Outline window to create the event handler routine.
 * 4) In the event handler, call the 'Recordset1.addImmediate' method, passing it the appropriate parameters.
 * 5) Save the page, then browse it in Internet Explorer.

Keywords: kbbug kbpending KB190768

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.