Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Select and Grid
Message
 
À
21/07/2005 15:21:06
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
01034869
Message ID:
01034872
Vues:
15
>VFP8. I have a form with parent record data and two grids to display data from child records. I use an SQL select to create cursors for the grids which use the cursors for a record source. When the form opens the grids with the child record data display correctly. However, if I move to a new parent record and at the same time do new SQL select statements using the same cursor name to get new child data for the grids, the grid data and headings disappear and remain missing until I start all over again. What am I doing wrong? TIA.

You should not SELECTing in the same cursor.
First SELECT (In Init event or Load Event of the Form) SELCT .... FROM .... INTO CURSOR YourGridCursor READWRITE

When you want to ReSELECT
SELECT .... FROM .... INTO CURSOR DifferentCursor

thisform.LockScreen = .t.
SELECT YourGridCursor
ZAP
APPEND FROM (DBF("DifferentCursor"))
USE IN SELECT("DifferentCursor")
thisform.LockScreen = .t.
BUT I recomend you to move to CursorAdapters with parameters, Then you just issue:
thisform.CAClassInstance.CursorRefresh()
thisform.Grid1.Refresh()
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform