Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Default values and GetFldState function
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01133463
Message ID:
01133469
Views:
18
>>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform