Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DefaultValue
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
The Mere Mortals Framework
Titre:
Divers
Thread ID:
00464751
Message ID:
00464758
Vues:
24
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform