OraScript & q'{...}' expression

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
sinys
Posts: 186
Joined: Tue 21 Feb 2012 03:44

OraScript & q'{...}' expression

Post by sinys » Mon 18 Aug 2014 15:08

XE2 odac 9.3.10

Code: Select all

procedure TForm2.Button1Click(Sender: TObject);
begin
  OraScript1.SQL.Text :=
'begin' + #13#10 +
'  dbms_scheduler.create_job(' + #13#10 +
'  job_name=>''j_null'',' + #13#10 +
'  job_type=>''plsql_block'',' + #13#10 +
'  job_action=> q''{' + #13#10 +
'  declare a varchar2(10):= ''test_var'';' + #13#10 +
'  begin' + #13#10 +
'    null;' + #13#10 +
'  end;' + #13#10 +
'  }'',' + #13#10 +
'  enabled=>true' + #13#10 +
'  );' + #13#10 +
'end;' + #13#10 +
'/' + #13#10 +
'';

  ShowMessage(IntToStr(OraScript1.Statements.Count)); // SHOWED 1 - it's OK.
  ShowMessage(OraScript1.Statements[0].SQL);  // SHOWED only half of sql - WHY?
end;

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: OraScript & q'{...}' expression

Post by AlexP » Tue 19 Aug 2014 07:53

Hello,

Thank you for the information. We have reproduced and fixed the problem. This fix will be included to the next ODAC version.

Post Reply