Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Refreshing a grid that has a cursor as it's row source.
Message
De
06/04/2003 09:56:59
 
 
À
06/04/2003 00:14:41
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00774513
Message ID:
00774524
Vues:
17
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform