Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Refreshing a grid that has a cursor as it's row source.
Message
From
06/04/2003 09:56:59
 
 
To
06/04/2003 00:14:41
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00774513
Message ID:
00774524
Views:
16
Hello Stephen.

Any suggestions as to how I can refresh a cursor while a form is active, without allowing my grid to go blank, or, simply, is there a better way for me to do the above operation ?

The best solution is to use a parameterized view instead of a cursor. Then you can just requery the view and the grid will not go blank.

If you must use a cursor, then you can use what I call a "safe select". What I mean by this is that you select into a temporary cursor, Zap the grid's RecordSource, and append from them temporary cursor into the grid's RecordSource. Zapping the grid's RecordSource does not close it so the grid does not go blank.

Code similar to the following:
SELECT yada, nada, blah FROM SomeTable WHERE SomeCondition INTO CURSOR  csrJunk NOFILTER
ZAP IN ( THIS.RecordSource )
SELECT ( THIS.RecordSource )
APPEND FROM DBF( 'csrJunk' )
USE IN csrJunk
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform