Information générale
Titre:
VFP seems to get data from a table without opening it!
Versions des environnements
I found an unexpected situation:
A method has the following code:
LPARAMETERS tcDataDict && Has value of 'DD_Fac_Int'
LOCAL llCloseDBF,laFields[1,4]
llCloseDBF = !USED(tcDataDict)
SELECT _fieldname,_fieldtype,_fieldlen,_field_dec FROM (tcDataDict) INTO ARRAY laFields
IF llCloseDBF
USE IN (tcDataDict)
ENDIF
...
RETURN
The method is called twice. The first time it works as I expected, namely the (tcDataDict) table is closed after the SELECT.
During the second call llCloseDBF takes on .F. before running the SELECT, and the laFields array is filled as expected, but the (tcDataDict) table is NOT opened, so USE IN (tcDataDict) gives error. Apparently VFP finds the data (perhaps from cache) without opening the (tcTableDict) table. I did not expect this behavior. Should I have expected it?
TIA,
Alex
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