Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cycle though tables in DataEnviornment
Message
De
07/01/2000 14:08:03
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00314653
Message ID:
00314654
Vues:
25
Here's the code I use to cycle and correct the pointer to the DBC:

*- Get Object members of Dataenvironment -*
=AMEMBERS(laCursorList, Thisform.DataEnvironment, 2)
IF EMPTY(laCursorList[1])
RETURN
ENDIF

*- loop thru cursors and replace database name with correct database to use -*
IF ALEN( laCursorList,1) > 0
FOR I = 1 TO ALEN(laCursorList,1)
loObj = EVAL("Thisform.DataEnvironment." + laCursorlist[i])
IF UPPER(loObj.BASECLASS) = 'CURSOR' AND '\' $ loObj.Database
IF NOT EMPTY(loObj.Database)
*- table in database -*
loObj.Database = oApp.gcDbPath + oApp.gcDbName
IF NOT DBUSED(loObj.Database)
OPEN DATABASE (loObj.Database)
ENDIF
SET DATABASE TO (loObj.Database)
ELSE
*- free table -*
loObj.CursorSource = oApp.gcDbPath + oApp.gcDbName
ENDIF
ENDIF
NEXT
ENDIF

>Is there a way to programaticily cycle though all the tables in the DataEnvironment of a form? Seems like there should be a way I can have a For-Next loop that just goes though all the cursors in the DE (I'll know how many of them are there)
>
>Thanks....

(On an infant's shirt): Already smarter than Bush
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform