OraScript compilation warnings

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
devuser
Posts: 4
Joined: Fri 30 Mar 2007 04:40

OraScript compilation warnings

Post by devuser » Tue 11 Dec 2007 05:31

Hello, I'm using odac 6 and delphi 6.
I'm running some dml scripts using OraScript.
After executing "create force view .." I'm getting compilation warnings.
Is there any way to suppress compilation warnings when creating views or pl/sql units in OraScript?

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Tue 11 Dec 2007 09:51

You can you the OnError event of TOraScript. Check Exception parameter that are passed to the event handler to detect compilation error, and set Action parameter to eaContinue to ignore error.

Code: Select all

uses
  OraError;

procedure TForm1.OraScript1Error(Sender: TObject; E: Exception;
  SQL: String; var Action: TErrorAction);
begin
  if (E is EOraError) and (EOraError(E).ErrorCode = 24344) then
    Action := eaContinue;
end;

devuser
Posts: 4
Joined: Fri 30 Mar 2007 04:40

Post by devuser » Tue 11 Dec 2007 11:26

Thanks for you reply.

Now, I'm using exact the same solution.

But when I was using ODAC 4, I've run the same scripts and havn't got compilation errors.

The problem with capturing error codes that I can get
00904 (view based on nonexistent package variable),
04063 (view based on nonvalid view),
24344 (package uses nonexistent package).

So, is there any way to ignore warnings but no errors?

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Tue 11 Dec 2007 12:31

We suggest that all compilation errors have ErrorCode 24344. Try to use the code from my previous post.

If you get another error code for some SQL statement, please provide us this statement.

Post Reply