ExecprocEx does not autocommit?

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
valentl
Posts: 16
Joined: Wed 22 May 2013 06:15

ExecprocEx does not autocommit?

Post by valentl » Thu 18 Jul 2013 13:15

Hello, an other problem (or question).
We tried to use the TOraSession's ExecprocEx method. It works fine, but as I see, it does not commit, however the OraSession's AutoCommit property is set to true. Clearly visible, that table locks remains in the database after a stored procedure call. But before, we didn't used the ExecProcEX, but we used a TOraStoredProc component, and it committed the changes to the database.
It is a problem for us.

We are using Delphi 2010, and the newest ODAC 9.0.2

I've tried with a very small test application, even ExecSQLEx does the same.

Code: Select all

procedure TForm244.Button1Click(Sender: TObject);
begin
  ORASession1.Open;
  ORASession1.AutoCommit : = True; // This is the default behavior, but I set it again. Does not matter :(
  ORASession1.ExecSQLEx('update mydebug set c_ertek1= :x',['x','X']);
end;
The mydebug table remains locked until I quit the application (or I commit explicitly, but my test application has only this button click method, so I must quit)

The only solution is, (luckyli the ExecProcex is virtual), to encapsulate the inherited method call with commit rollback statements.

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

Re: ExecprocEx does not autocommit?

Post by AlexP » Fri 19 Jul 2013 10:53

Hello,

Thanks for the information, we'll consider the possibility to change this behavior in one of the following versions

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

Re: ExecprocEx does not autocommit?

Post by AlexP » Mon 17 Feb 2014 14:07

We have changed the behavior. Now, on calling ExecSQL, the Autocommit property value is taken into account.

Post Reply