Page 1 of 1

OraScript compilation warnings

Posted: Tue 11 Dec 2007 05:31
by devuser
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?

Posted: Tue 11 Dec 2007 09:51
by Plash
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;

Posted: Tue 11 Dec 2007 11:26
by devuser
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?

Posted: Tue 11 Dec 2007 12:31
by Plash
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.