PRB: Cursor-Based Grid Goes Blank If SQL SELECT Resets CursorLast reviewed: January 8, 1998Article ID: Q140653 |
3.00 | 3.00bWINDOWS | MACINTOSH kbtool kbprb The information in this article applies to:
SYMPTOMSIf a grid's RecordSource property is set to a cursor, and then the SQL SELECT command resets the cursor, the grid appears blank if the RecordSource property is not set back to itself. The following command will refresh the grid properly if a SQL SELECT is run to rebuild the cursor, but if the grid's column or header properties have been customized, these customized changes will be lost and the grid's column and header properties will change back to their default settings:
THISFORM.GRID1.RECORDSOURCE=THISFORM.GRID1.RECORDSOURCESuch customization could be headers with different names, longer column lengths, and code placed in the events of columns or headers. For more information, please see the following article in the Microsoft Knowledge Base:
ARTICLE-ID: Q131836 TITLE : PRB: Grid Not Refreshing Displaying a Cursor from Query CAUSEWhen you rebuild the cursor that the grid is based on with the SQL SELECT command, the original cursor has to be destroyed before the new cursor can be created. When this happens, the grid columns and headers are also cleared and then recreated. Even when the grid's RecordSource is set back to itself, the custom settings of the grid's columns and headers are lost.
RESOLUTIONTo refresh the grid without losing the custom properties of the columns and headers, set the RecordSource property to a dummy cursor that already has been created with the same fields as the cursor the grid is based on. After the SQL SELECT is run, change the RecordSource property back to the rebuilt cursor. This allows the properties of the columns and headers to remain intact while the cursor is being rebuilt.
STATUSThis behavior is by design.
MORE INFORMATION
Steps to Reproduce Behavior
|
Additional reference words: VFoxMac 3.00b 3.00 VFoxWin
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |