Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DefaultValue
Message
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Title:
Miscellaneous
Thread ID:
00464751
Message ID:
00464758
Views:
23
You definitely don't want to set the default value in your view. This will trigger NewID to be called twice whenever you add a record to your view. You will end up wasting keys.

As far as why you are getting this error, I would venture to guess that either lcBaseTable or lcPrimaryKey isn't the correct value. You should probably just trace through the OnNew method and see how they are getting assigned.

>My program fails when I try to add a new record.
>The error # is 11
>Message: Function argument value, type, or count is invalid
>LINE: 99
>Code: lcDefaultValue = DBGETPROP(lcBaseTable+”.”+lcPrimaryKey,”Field”, ”DefaultValue”)
>Method: onnew
>Object: contform1.pgfbizobj.page1.contobj
>
>The program has the correct info as far as lcBaseTable and lcPrimaryKey variables are concerned, but it cannot find the DefaultValue. In the table itself the DefaultValue is newid(). If one append a blank to the table itself the newid() function works fine and offers the next unique id. But the view knows nothing about newid(). Is there a line I can add to the views.prg that will give this information to the view?
>Thanks in advance Allan.

Doug Stalter

"According to the proverb, the best things are the most difficult." -Plutarch
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform