The information in this article applies to:
SYMPTOMSIn certain scenarios, you may find your Grid Design-Time Control (DTC) disappears unexpectedly when you click the Recordset Navigation button or the Page Navigation button. This happens most frequently when calling parameterized queries or stored procedures and displaying the results using the Grid DTC. The Grid DTC may disappear after a roundtrip to the server. CAUSEThis behavior is due to a state preservation problem of the Grid DTC Script object. Within the Script Library, the _DG_Display() function is used to display the user interface (UI) of the Grid DTC on the page. After the Active Server Pages (ASP) page makes a roundtrip to the server, the Recordset DTC, which the Grid DTC is bound to, may be lost. In these cases, the objRS._isEmpty() function returns true when called by the _DG_Display() function. As a result, no table is being written to the page. RESOLUTIONYou can work around this problem by adding the following code to manually reopen the Recordset DTC in the thisPage_OnEnter() event handler: NOTE: If you are passing a value programmatically to the Recordset DTC, you need to re-specify the SQL Text or the parameters in this event handler before opening the Recordset.
MORE INFORMATIONSteps to Reproduce BehaviorUse the following steps to build a sample to call a parameterized query against the SQL Server "pubs" database and demonstrate how the Grid DTC can disappear unexpectedly.
Additional query words:
Keywords : kbCtrl kbDatabase kbVisID600 kbGrpASP |
Last Reviewed: October 7, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |