S
Sascha Zehringer
Guest
I'm trying to apply changes and release the changed tables in a sub transaction but not yet in the main transaction.
Like so:
But all what progress does, is not apply the data after the end of the sub transaction.
I tried to do it like Tom said here and use a different file with a different file.
But this didn't work, but I also think I did it wrong. Since this did not really spawn a new "_progress.exe" process.
I hope someone can help me.
Continue reading...
Like so:
Code:
MAIN_TRANSACT:
DO TRANSACTION:
// do stuff
SUB_TRANSACT:
DO TRANSACTION:
// change stuff
FIND testTable WHERE ... SHARE-LOCK.
IF AVAILABLE testTable THEN DO:
testTable.value = "new value".
RELEASE testTable.
END.
END. // apply
// do stuff
END.
But all what progress does, is not apply the data after the end of the sub transaction.
What i tried:
I tried to do it like Tom said here and use a different file with a different file.
Code:
// main.p
DEFINE VARIABLE hSubFile AS HANDLE NO-UNDO.
IF NOT VALID-HANDLE(hSubFile) THEN DO:
RUN sub.p PERSISTENT SET hSubFile.
END.
MAIN_TRANSACT:
DO TRANSACTION:
// do stuff
RUN subTransaction IN hSubFile.
// do stuff
END.
DELETE OBJECT hSubFile NO-ERROR.
Code:
// sub.p
PROCEDURE subTransaction:
SUB_TRANSACT:
DO TRANSACTION:
// change stuff
FIND testTable WHERE ... SHARE-LOCK.
IF AVAILABLE testTable THEN DO:
testTable.value = "new value".
RELEASE testTable.
END.
END. // apply
END PROCEDURE.
But this didn't work, but I also think I did it wrong. Since this did not really spawn a new "_progress.exe" process.
I hope someone can help me.
Continue reading...