Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Deleting records
Message
From
26/01/2001 15:16:11
 
 
To
26/01/2001 14:54:32
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00469178
Message ID:
00469197
Views:
12
>Hello,
>In a table, I am deleting records with a field called "press",
>i.e. delete for machines where press = deletepress
>
>Later on down the line, if the user decides to add the machine back in, I get
>an error "uniqueness of machine is violated" even though, when I browse the table, that machine appears to no longer be present.
>
>Help?
>Thanks in advance.

If machine is a primary key and that key still exists in the table even though the record it is in is marked deleted, the primary key constraint has still been violated.

Some options ... you can SET DELETED OFF, search for the key and if found, RECALL the record and make any other changes to the data in the record then SET DELETE ON instead of inserting a new record.

If you have the luxury you can PACK the table after deletes to truly remove the record although this is not usually a viable option.

Ohters may have more options for you.

Bill
William A. Caton III
Software Engineer
MAXIMUS
Atlanta, Ga.
Previous
Reply
Map
View

Click here to load this message in the networking platform