Please handle ACCEPT SqlPlus command

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
heidenbluth
Posts: 56
Joined: Mon 08 Nov 2004 19:01
Location: Germany

Please handle ACCEPT SqlPlus command

Post by heidenbluth » Fri 09 Feb 2018 20:42

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.

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: Please handle ACCEPT SqlPlus command

Post by MaximG » Wed 14 Feb 2018 10:45

We will add support for ACCEPT SqlPlus command in the next build of our product

Post Reply