You are not logged in.
FDBClient := TSQLIte3HttpClient.Create('localhost', '8080', FSQLModel);
ASessionID := GetCurrentThreadID;
FDBClient.TransactionBegin(TAPM_STRING_DATA, ASessionID);
try
…
…
FDBClient.Commit(ASessionID); // <-- it dosen't work!!! TSQLite3HttpClient.TransactionBegin accept session id only "1"!!!
except
FDBClient.Rollback(ASessionID); // <-- it dosen't work!!! TSQLite3HttpClient.TransactionBegin accept session id only "1"!!!
end;
fixed code
procedure TSQLRestClientURI.RollBack(SessionID: cardinal);
begin
// inherited Rollback(SessionID); // reset fTransactionActive flag
inherited Rollback(CONST_AUTHENTICATION_NOT_USED); // <-- fixed
URI(Model.Root,'ABORT');
end;
procedure TSQLRestClientURI.Commit(SessionID: cardinal);
begin
// inherited Commit(SessionID); // reset fTransactionActive flag
inherited Commit(CONST_AUTHENTICATION_NOT_USED); // <-- fixed
URI(Model.Root,'END');
end;
Offline
You are right.
I've fixed TSQLRestClientURI.Commit/RollBack to work as expected by TSQLRestClientURI.TransactionBegin().
The CONST_AUTHENTICATION_NOT_USED parameter was expected to be supplied here!
Thanks a lot for the feedback.
Offline