General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
>>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!
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only