how to "set autocommit on/off" Use UniConnection in oracle

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
daizhicun
Posts: 109
Joined: Thu 21 Jan 2010 11:49

how to "set autocommit on/off" Use UniConnection in oracle

Post by daizhicun » Sun 28 Nov 2010 02:21

we know that ,use SQLPLUS

we can set autocommit on/off

for exemple:
SQL> set autocommit off

SQL> show autocommit;
autocommit OFF

SQL> set autocommit on

SQL> show autocommit;
autocommit IMMEDIATE

And TOAD can "set autocommit on/off" too.

i want to know how to "set autocommit on/off" Use UniConnection in oracle

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Post by AlexP » Mon 29 Nov 2010 09:19

Hello,

To commit changes in UniDAC components manually you should start a transaction manually:

begin
UniConnection1.StartTransaction;

... // change your data

UniConnection1.Commit;
end;

All changes will be posted to the database after calling UniConnection1.Commit only.

If you do not start transaction manually all statements will be commited on execute.

Post Reply