Hi All,
I have a requirement where I need to be able to add/update and delete records inside a transaction, regardless of the outcome of the transaction - the record must be changed no matter what.
Now, I can use RELEASE for adding/updating, but what do I use when I want to force the delete?
In this example, I want the delete of rec2 to happen regardless, while rec1 should do normal transaction things.
According to what I've read here, RELEASE after DELETE keeps the record lying around, when I want to force the delete to happen.
I can go into more detail if required, but any ideas would be welcome!
I have a requirement where I need to be able to add/update and delete records inside a transaction, regardless of the outcome of the transaction - the record must be changed no matter what.
Now, I can use RELEASE for adding/updating, but what do I use when I want to force the delete?
Code:
DO TRANSACTION
:[INDENT]CREATE rec1.
UPDATE rec1.field1.
FIND rec2.
DELETE rec2.
IF rec1.field1 = 1 THEN UNDO, RETURN.[/INDENT]END.
In this example, I want the delete of rec2 to happen regardless, while rec1 should do normal transaction things.
According to what I've read here, RELEASE after DELETE keeps the record lying around, when I want to force the delete to happen.
I can go into more detail if required, but any ideas would be welcome!