Interrubted stored procedure

In this forum we will discuss things relating the ZEOSLib 6.6.x stable versions

Moderators: gto, EgonHugeist

Post Reply
h.o.o.k
Fresh Boarder
Fresh Boarder
Posts: 9
Joined: 30.10.2009, 13:18

Interrubted stored procedure

Post by h.o.o.k »

Hi all,

I have a stored procedure in my db (oracle 10g enteprise) with name "myPROC". This procedure have one parameter type text with name "table".
Procedure process perhaps 350 000 records by cursor. When i call procedure from etc. ORACLE developer by SQL command so operations pass correct. BUT when i do this:

Code: Select all

try
connection.StartTransaction;

qry.SQL.text := 'CALL myPROC('table name')';
qry.ExecSQL ;

connection.commit;

except on e:Exception do
begin
  writeErroLOg(e.message);
  connection.rollback;
end;

from my application so app throw NO ERROR, everthing look OK but procedure pass only etc 200 000 records. Just procedure is interrupt. i dont know what am i doing.

Please HELP.

note: I am so sorry for my English, i am junior developer from czech republic. Thaks for our understanding.
Wild_Pointer
Expert Boarder
Expert Boarder
Posts: 164
Joined: 18.03.2008, 13:03
Contact:

Post by Wild_Pointer »

Hello h.o.o.k,

I don't know how it is in Oracle, but in postgresql procedure either procedure is executed whole or not at all... It is hard to believe, that the Oracle server would interpret query differently just because it was issued by Zeos components :). So maybe the procedure myPROC should be checked looking for the problem?..

One more thing - you should put line connection.StartTransaction; before the try statement, because it would not be right to rollback transaction if you get an error on starting it.

Good luck!
h.o.o.k
Fresh Boarder
Fresh Boarder
Posts: 9
Joined: 30.10.2009, 13:18

Post by h.o.o.k »

Thanks for reply!

On this i know too. But why from the ORACLE developer myPROC is pass success? I dont understand it. :0(( So im going search error in proc.

Thank you
Wild_Pointer
Expert Boarder
Expert Boarder
Posts: 164
Joined: 18.03.2008, 13:03
Contact:

Post by Wild_Pointer »

h.o.o.k, You can add ZSQLMonitor to your project so see what SQL is send to the server. Maybe this will help you.
Post Reply