General information
Category:
Coding, syntax & commands
>>Hi all,
>>
>>I just had a frustrating hour or more.
>>
>>A form with table buffering for specific table (of a .DBC), MULTILOCKS ON, etc...
>>
>>An APPEND BLANK, set the PK field, then SETFLDSTATE on PK field so it looks UNCHANGED.
>>In the Valid() of my subclassed TextBox I was comparing This.Value to the field's OLDVAL. Because it is a subclass the field can be anything so I deconstruct the ControlSource to construct the OLDVAL statement and I include the alias as a parameter.
>>
>>When the input field remained untouched (just tabbed through them) the compare never returned TRUE.
>>
>>I ultimately found that OLDVAL was returning .NULL. even though the field does NOT allow NULL (none of the fields in the database do).
>>
>>Is this normal? Checking OLDVAL in both VFP Help and Hacker's doesn't mention this.
>
>AFAIK SETFLDSTATE() does not work properly when used to make a row look "unchanged". HackFox3 says as much and I couldn't get it to work the way I wanted to in VFP5 either (don't know offhand if it was ever changed in VFP6).
>
>I have no idea if this is the root cause of what you're seeing.
Hi Al,
As I read Hacker's (6) the problem with SetFldState is that it cannot be used to prevent an update of the record. In my case I only use it to allow me to do a GETFLDSTATE later.
This part seems to work as I want. It was the .NULL. return that surprised me.
Thanks for the help.
JimN
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only