Microsoft KB Archive/190594

= BUG: Recordset Commands Must Wait Until the Ondatasetcomplete Event Fires =

Article ID: 190594

Article Last Modified on 10/16/2002

-

APPLIES TO


 * Microsoft Visual InterDev 6.0 Standard Edition

-



This article was previously published under Q190594



SYMPTOMS
You may receive the following error message:

A Runtime Error has occurred.

Do you wish to debug?

Line 630

Error: The operation requested by the application is not allowed if the object is closed.

This error is most likely to occur on a Dynamic HTML (DHTML) page and most often occurs with large database objects.



CAUSE
The recordset is not fully loaded in memory at this point.



RESOLUTION
Wait until the ondatasetcomplete event fires before you continue.



STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.



MORE INFORMATION
Wait until the ondatasetcomplete event fires to use the results from the newly opened recordset. For example:  

Steps to Reproduce Behavior
The following steps will normally produce this error. The error is more likely to occur under the following conditions:


 * The database object (table, view, and so forth) is large.
 * The client computer is fast.
 * The connection to the database server is slow.

 Create a project. Add a data connection. Add an HTML page. Place a recordset DTC, a text box DTC, and a button DTC on the page.</li> Bind the recordset DTC to a database object.</li>  Add an event for Button1_onclick as follows: function Button1_onclick { Recordset1.open; Textbox1.value = Recordset1.fields.getValue(0); }                   </li> Browse to the page, and click the button.</li></ol>

Keywords: kbbug kbdatabase kbctrl kbpending KB190594

-

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

© Microsoft Corporation. All rights reserved.