Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
>>Hi,
>>
>>I have a variable that needs to be unique in a table. Of course, I created an index on it and made this variable "primary". Now, when I try to enter a new row of data with the value of this variable identical to another row of data I get a message saying "Uniqueness of index [...] is violated." That's great! It's exactely what I want. But afterwards, I'm having problems with my app because the table can't be closed because VFP is still trying to update the table. What I would like for VFP to do is to cancel the addition of the new row when this kind of error arises. Is that possible? Or do I have to programmatically make sure that no other row of data has this value before I try to insert it in the table?
>>
>>Thanks a lot in advance, Stephane.
>
>TABLEREVERT() after the failure.
It's always simple isn't it?
Thanks a lot!
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement