Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Deleted record conflicts with new record
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00508856
Message ID:
00509163
Views:
21
>>>I have a primary index (ordernum) on a table (orders).
>>>
>>>If I delete record ordernum=1 then try to add a new
>>>ordernum=1 I get a message stating that the uniqueness
>>>of primary key ordernum is violated. Is there any way
>>>to make the vfp5 ignore deleted records when adding a
>>>new one with the same key?
>>
>>
>>You would have to add the NOT DELETED() filter to you primary key
>>
>>
>>
>>- Brian
>
>Brian,
>If you are bound and determined to reuse a deleted primary key then just RECALL it (which undeletes it) and condition the fields in the record to 'new' condition before displaying the entery screen.
>JLK

OOPS!
I forgot to add that I wouldn't do what I suggested above if this key could possibly have had parent-child relations in other tables. That gets to be a real mess unless the child tables have been packed.
Nebraska Dept of Revenue
Previous
Reply
Map
View

Click here to load this message in the networking platform