Page 1 of 1

Please handle ACCEPT SqlPlus command

Posted: Fri 09 Feb 2018 20:42
by heidenbluth
If you run a script that contains an ACCEPT command followed by a DECLARE..BEGIN..END block, TOraScript component gets confused and does not recognize the PLSQL block correctly.
ACCEPT should be handled similar to PROMPT, that is processed correctly.

Code: Select all

prompt 123
accept myvar

declare
 i integer;
begin
  null;
end;


You can add support by adding ACCEPT everywhere PROMPT is implemented:

Code: Select all

OraParser.pas
=============

const
  ...
  lxACCEPT         = lxOraFirst;
  lxALTER          = lxACCEPT+1;

initialization
  ...
  OraKeywordLexems.Add('ACCEPT',         lxACCEPT   );

OraScriptProcessor.pas
==================

procedure TCustomOraScriptProcessor.CheckLexem(
...
          // lxAccept added at line 107, 2018_02_09_Holger
          lxEXIT, lxPAUSE, lxAccept, lxPROMPT, lxQUIT, lxREMARK, lxREM, lxUNDEFINE:
            StatementType := ST_IGNORED;
I would appreciate if you can add this change to your next release.

Re: Please handle ACCEPT SqlPlus command

Posted: Wed 14 Feb 2018 10:45
by MaximG
We will add support for ACCEPT SqlPlus command in the next build of our product