TOracle Session and ORA-00911: invalid character

kschmutz

Member
I can't seem to figure this one out...

Using Delphi 6.0 and DOA 3.4.5

I have an Oracle table which contains a varchar2(2000) column called 'script_text'. This column contains PL/SQL which will need to be executed.

Here's the code...
-------------------

procedure TForm1.Button1Click(Sender: TObject);
var
script: string;
begin
dsDelta.First;
oraScript.Lines.Clear;
script := dsDelta.FieldValue['script_text'];
oraScript.Lines.Append( script);
oraScript.Execute;
end;

Here's what the 'script_text' field contains...
-----------------------------------------------------
select sysdate from dual;

select sysdate from dual;

Here's the error I get....
----------------------------
select sysdate from dual;

select sysdate from dual

ORA-00911: invalid character

-----------------------------

If the script contains a single SQL statement it works. Is there a carriage return line feed problem? I've been editing the script_text column using PL/SQL Developer.

It seems that Oracle thinks it's one big SQL statement since the first select statement is not executed.

Any suggestions would be nice..

-kurt
 
I'm guessing this control (TOracleScript) does not parse the additions to the Lines property and thus does not find the multiple commands.
 
Hey I figured it out DOH....

I needed to assign my script to the Lines.Text property and not use the Add methods.

Thanks for all your help ;-)
 
That's what this forum is for: to help each other out
wink.gif
. It does seem like a bug though, so we'll look into it.

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