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;
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;