Page 1 of 1

ORA-6550 with multi-line string

Posted: Thu 09 Feb 2006 15:59
by heidenbluth
Hello,

you can run a PL/SQL block like

declare
vstmt varchar2(2000) :=
'BEGIN
dbms_output.put_line( :1 );
dbms_output.put_line( :2 );
END;';
v1 number := 234;
v2 varchar2(100) := 'Hallo';
begin
execute immediate vstmt using in v1, in v2; end;


from SQL*Plus. The vstsmt string comprises multiple rows.
If I execute this block from a TOraQuery I get ORA_6550 and PLS-103 errors.

Maybe SQL*Plus separates lines UNIX-like by LF only and ODAC separates them WINDOWS-like by CR+LF? Can this be changed?

Regards,
Holger

Posted: Fri 10 Feb 2006 15:07
by Challenger
It happens because ODAC doesn't remove CR symbols within a pair of quotes. To avoid this problem you should fit vstmt string in one line or remove CR symbols from SQL statement before executing it.