Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SetFldState not working in VFP 7
Message
From
04/10/2001 03:00:19
 
 
To
03/10/2001 18:31:59
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00563930
Message ID:
00563989
Views:
26
Hi!

See notes below...

>Hello,
>
>When appending a record in a table, that has a default value for a field, the GETFLDSTATE(-1) function returns the number "4" for the fields that have been changed by the default value function.
>
>I used SETFLDSTATE(lnFieldNumber, 3) in order to set the field state to 3 (appended, not changed). This worked in VFP 6, but not anymore in VFP 7.
>

By many reports SetFldState() function did not worked properly in VFP6 too. If some particular call of it worked in VFP6, this probably was not reliable (as you see now).

>Note that this does not work only if the field is changed by the default value of the table (it must be a database table).
>
>Is this a bug in VFP 7, or is this a change to the function? Is there a workaround?
>The reason I need this function to work is, that I do not want any changes to be detected by a simple append.
>

Well, why you need this? You can make a view, open it with NODATA option and append recrd to it - this will cause no any default values from the table definition apply to the view fields. Tell more details, and probably we will be able to find some other solutions. I know SetFldState() is needed in VERY rare situations and neve heard it is used in production.

>Thanks for your help in advance.
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform