>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.