problem in TDAScript.Execute
Posted: Mon 11 Jun 2012 07:32
Hi,
My problem happened when I try to execute sql script via OraAcript, then break execution (or script raises an exception) and after that try to execute same script again (without restarting application or recreating OraScript).
I start finding a solution for my problem and I found that TDAScript.Execute doesn't initialize FProcessor.FCurrentStatementIdx and this causes my problem.
I think the same problem will happen when you try to change sql script and execute it again without recreating OraScript.
So I've just initialized index in TDAScript.Execute like this:
P.S. I'm using ODAC 8.1.5 with Delphi XE
My problem happened when I try to execute sql script via OraAcript, then break execution (or script raises an exception) and after that try to execute same script again (without restarting application or recreating OraScript).
I start finding a solution for my problem and I found that TDAScript.Execute doesn't initialize FProcessor.FCurrentStatementIdx and this causes my problem.
I think the same problem will happen when you try to change sql script and execute it again without recreating OraScript.
So I've just initialized index in TDAScript.Execute like this:
Code: Select all
...
FProcessor.FCurrentStatementIdx := -1; // <--------- My Fix
FProcessor.FCurrDelimiter := FDelimiter;
...