Information générale
Catégorie:
Gestionnaire d'écran & Écrans
Erik:
The DataEnvironment object does not have a SetAll method. I don't understand why VFP does not consider it as a container (with a objects collection)...
Rajesh:
Try something like this:
*----------------------------------------------
*-- Dataenvironement - BeforeOpenTables method
*----------------------------------------------
=THISFORM.SetDEProp(THIS)
*---------------------
*-- SetDEProp method
*-- -----------------
LPARAMETERS toDE
LOCAL lnCounter && Loop counter.
LOCAL lcDatabase && The current Atlas database.
LOCAL lcName && The name of the oontained object.
LOCAL loObject && The object under consideration.
LOCAL lnObjectCount && Number of objects in the DE.
LOCAL laObjects[1] && Contains a reference to each object in the DE
lcDatabase = goapp.Database
IF (TYPE("toDE") == "O") AND NOT ISNULL(toDE)
IF LOWER(toDE.BaseClass) == "dataenvironment"
lnObjectCount = AMEMBERS(laObjects, toDE, 2)
FOR m.lnCounter = 1 TO m.lnObjectCount
lcName = laObjects[m.lnCounter]
loObject = toDE.&lcName.
IF LOWER(loObject.BaseClass) == "cursor"
loObject.Database = m.lcDatabase
ENDIF
ENDFOR
ENDIF
ENDIF
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement