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