Replies: 1 comment
-
Connection_id is always different because for every request that you send to server, a new instance of the ServerMethodClass (RESTDWDataModule) will be created to individually process the request. After the request is processed, the instance will automatically be destroyed and released from memory. That behavior is called "Stateless call". About commit and rollback that will depend on which DAC you're using, if its FireDAC, you will need to handle the SQL Queries through: BeginTransaction;
do something with query
if true then
Commit
else
Rollback; Those are transaction controlling commands. On different DACs (Data Access Components) it will have different sintax, but that's the general Idea. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
i'm trying using mysql/mariadb,
and test this simple command in demo,
select connection_id()
result always change, if you use mysql client or heidisql etc, connection id is always same until new connection create/broken
if use use this method, (i'm talk about single command not batchsql), whats happen ???
OpenSQL('set autocommit=0');
try
try
if NOT OpenSQL('update stok where qty=1') then //update with no autocommit
raise Exception.Create('error');
finally
OpenSQL('set autocommit=1');
end;
Beta Was this translation helpful? Give feedback.
All reactions