Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SetFldState not working in VFP 7
Message
From
04/10/2001 08:33:32
 
 
To
04/10/2001 08:26:41
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00563930
Message ID:
00564068
Views:
23
Hi!

I still do not understand tha use case.
For example, you put in table default value expression for primary key field. When you use APPEND BLANK command, new primary key generated automatically and put into the field value. I do not understand why you want to mark it as it is not changed. Is it not enough just clearing the field value?

BTW, try to clear the field value and then use SETFLDState. Maybe SETFLDState() in VFP7 is more complicated, so it see that value is changed really and prohibit to change state.

Another suggestion: Did you tried to use INSERT INTO command instead of APPEND BLANK? As ar as I know, it does the same, but fields are not marked for change despite they;re pre-filled by default values.

>>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.
>I use the default values in tables because upon appending of records it gives me a simple way to have some fields the correct values right away.
>Those values are for example the primkey.
>
>I could also do the updating after the appending, in code. But this would be more work and more difficult to maintain. I would really have liked to use this simple solution, and instead of missing the default value option, I even prefer to let the user prompt for "Save changes?".
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