Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Default values and GetFldState function
Message
De
03/07/2006 14:03:58
 
 
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:
01133469
Vues:
19
>>Isn't adding a record is a change by itself?
>>
>
>No, not in our framework. In other words, I want to be able to distinguish between new and empty (no changes done to the record) and new and dirty (some changes were done). In my case I receive false positives because of iActive_Flag. It may be a MereMortals issue and we may need to somehow change the IsChanged method (it currently already ignores PK fields), but I'd like to also hear some suggestions outside the framework.
>
>>>I'm using a view. The table has iActive_Flag field with default value = 1. In my view I set the same default value for the iActive_Flag. Now, when I add a record, GetFldState function reports this field as changed and therefore even if I don't change anything I see a question asked: "Do you want to save your changes?".
>>>
>>>How can I solve this problem?

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
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform