Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cursors and Data Environments
Message
De
16/07/1998 11:12:03
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00118104
Message ID:
00118122
Vues:
18
>>You don't need in this relationships. Actually, the code snippet should look like this:
>>*** move record pointer in clients tables (nav button or combo selection)
>>nId=clients.id
>>Select * From Trips Into Cursor curTrip Where Trips.clientid=nId
>
>Ok, that makes sense.
>
>>This is simplified code, in real situation you better CREATE CURSOR first, e.g. in Form.Init event and just repopulate it when clients pointer moved.
>
>I hate to sound like a two-year-old, but, "Why?" Is there a reason that it's better to create the cursor first instead of just letting the SQL create it?
>
>Thanks,
>
>-Michelle

There is known grids problem. They hate to see their cursors to be bluntly overridden. It can be accomodated, but if you have small cursor, then it's reasonable not to override it. Your code may look like:
nId=Clients.id
IF NOT USED("curtrip")
CREATE CURSOR curtrip (.....)
Thisform.Grid1.Recordsource="curtrip"
ENDIF
Select curtrip
set safety off
ZAP
set safety on
Select ....From Trips Into Array Myarray Where Trips.ClientId=nId
Insert Into Curtrip From Array myarray
Thisform.Grid1.Refresh
Edward Pikman
Independent Consultant
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform