Is TOraStoredProc auto-commit?

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
yipych
Posts: 1
Joined: Sun 27 Jun 2010 06:58

Is TOraStoredProc auto-commit?

Post by yipych » Sun 27 Jun 2010 07:13

My code is as below.

Code: Select all

.StoredProcName := 'xxx';
.CreateParam.....
.Execute
The stored proc itself does not include commit. But it seems that it does commit automatically.

The AutoCommit has been set to false on the connection object.

bork
Devart Team
Posts: 649
Joined: Fri 12 Mar 2010 07:55

Post by bork » Wed 30 Jun 2010 13:55

Hello

I created a simple procedure:

Code: Select all

CREATE OR REPLACE PROCEDURE SCOTT.test_proc
AS
BEGIN
  INSERT INTO test_table (id, NAME) SELECT MAX(ID) + 1, 'test ' || TO_CHAR(MAX(ID) + 1) FROM test_table;
END;
/
And executed it:

Code: Select all

  OraSession1.AutoCommit := False;
  OraStoredProc1.AutoCommit := False;
  OraStoredProc1.ExecProc;
A new record wasn't committed to the database. The new record was committed to the database after calling OraSession1.Commit only.

If you have a different result, then please provide me the exact ODAC version that you are using (for example 6.90.0.59). Also please provide the DDL script to create your stored procedure and the tables that are used in your stored procedure.

Post Reply