Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
OLDVAL return .NULL.
Message
From
17/06/2001 16:45:35
 
 
To
17/06/2001 13:20:41
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00520390
Message ID:
00520403
Views:
16
>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.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform