Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CA with native database and DEFAULT values
Message
 
 
To
27/03/2007 23:38:07
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01208992
Message ID:
01209085
Views:
20
>Naomi,
>
>>I've specified DEFAULT for one of my fields as cEntered_by C(10) DEFAULT GetUserID()
>>However, when I try APPEND BLANK, my field is not getting populated.
>
>It works for me in VFP9. How about putting a WAIT WINDOW or SET STEP ON at the top of your GetUserID() function, then try it and see if it gets called at all? If so, step through it and be sure it's returning something.
>
>When you say you specified the default, I assume you mean that you included
cEntered_by C(10) DEFAULT GetUserID()
in the CursorSchema property? Are you sure the CursorSchema is being used? Are you including the parameter on the CursorFill call that specifies that CursorSchema is to be used?

Hi David,

Appreciate your reply. I later tried just with a constant (my User ID) and it still was not updating. I then ran the example from Aleksey's message Re: Updating CursorAdapter w/Free Tables Thread #1161323 Message #1208996 and again default values were not set when INSERT command was issued.

In my application I'm using CursorSchema and Mark McCasland's CABuilder.

Therefore I conclude, that in VFP8 default values are ignored.

I solved my particular problem by different way (using Ed's suggestion) and hopefully we would upgrade really soon (I don't know how long does it take in to get purchase approval).
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform