Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Default values and GetFldState function
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01133463
Message ID:
01133480
Vues:
24
>>>GetFldState(-1), first byte:
>>>3 Field in an appended record has not been modified or deletion status has not changed for the appended record.
>>>
>>>IF LEFT(GetFldState(-1),1) == [3] AND ;
>>>   NOT [4] $ SUBSTR(GetFldState(-1),2)
>>>  ** Nothing changed in this record
>>>ENDIF
>>>
>>
>>In my case there is 4 in the iActive_Flag field, though I didn't touch the record at all. This is the default value.
>
>Skip it. Check other field.
>Or:
>
>IF LEFT(GetFldState(-1),1) == [3] AND ;
>   NOT [4] $ SUBSTR(GetFldState(-1),2)
>   ** Nothing changed in this record
>ELSE
>   LOCAL lcFldStatStr, lcDefault, lnbFieldNo, lbSomethigIsChanged
>   lcFldStatStr = SUBSTR(GetFldState(-1),2)
>   lnbFieldNo   = 1
>   DO WHILE NOT EMPTY(lcFldStatStr)
>      IF LEFT(lcFldStatStr,1) == [4]
>         IF DBGETPROP(FIELD(lnbFieldNo),[DefaultValue]) # TRANSFORM(EVAL(FIELD(lnbFieldNo)))
>            lbSomethigIsChanged = .t.
>            EXIT
>         ENDIF
>      ENDIF
>      lcFldStatStr = SUBSTR(llcFldStatStr,2)
>   ENDDO
>   IF lbSomethigIsChanged
>      ** Somethig is changed for this field
>   ENDIF
>ENDIF
>
>Something like that, but not tested.

Yes, I was thinking about something like that too, but unfortunately it's a framework unsubclassed class and I really don't want to change framework classes. I changed the particular form where I found the problem and decided to leave other cases unfixed.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform