TOracleScript - parser bug or feature?

fneuhaus

Member
The OracleScript-Component doesn't recognize PL/SQL blocks of the format

DECLARE
BEGIN
END;

as one block. Instead the parser takes every line between DECLARE and just before the BEGIN-Statement as one separate TOracleCommands-Object and the code between BEGIN and END as one block. The problem is that you can't declare any variables
for the PL/SQL block in that way. A workaround is to use one exta BEGIN/END pair but I suppose this is not the intended behaviour of the script-component.

Example that works:

BEGIN
DECLARE
Test PLS_INTEGER;
BEGIN
Test := 7;
END;
END;
 
You are right, this is a bug in the TOracleScript component. We will fix this for the next patch release, and in the mean time you can apply the work around you mentioned.

------------------
Marco Kalter
Allround Automations
 
Back
Top