Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Annoying Error Messages
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00110171
Message ID:
00110318
Vues:
30
>>I am trying to insert into from memvar into a table that has default values set by stored procedure. Insert into from memvar does an annoying thing which is write nothing to any unspecified field. This is a violation of a unique index and I get of all things, a data type mismatch. Then you say OK to the error it processes the stored procedure anyway and everything is hunky dorey again. Fine for me but my client doesn't like annoying error messages. Is there a fast way to get rid of this message without jumping through too many hoops?
>>
>>Eric K.
>Eric,
>
>Use the defaultValue setting in the dbc to give your new record a unique ID. Waiting for the Rules or triggers is too late as you can see the index is checked before those events fire.

Jim,

This is not a rule or trigger. The stored procedure is get_new_index() which is the default value. The command, INSERT INTO, does not wait to see if there is a default value, it just leaves any field not specified in the memvar list, empty. This immediately violates the uniqness of the value of that field. However, after the error is issued, the empty field is relaced by the default value. Maybe the error message is wrong. I don't know how this could happen.

Eric K.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform