TOraScript - Access violation

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
carrieri
Posts: 7
Joined: Mon 26 Sep 2005 17:35

TOraScript - Access violation

Post by carrieri » Mon 26 Sep 2005 19:43

Hi,

Delphi 5, Oracle 9.2 (Client / Server), ODAC 5.55.1.22

I´m using TOraScript to compile a set of procedures from disk:

Code: Select all

  FindFirst('*.sql', faAnyFile, sr);
  repeat
    OraScript1.Lines.LoadFromFile(sr.Name);
    OraScript1.Execute;
  until (FindNext(sr)  0);
  FindClose(sr);
Only the first procedure is compiled successfully, on the second one, I receive a Access violation error.

Is there anything missing?

Thanks.

Alex
Posts: 655
Joined: Mon 08 Nov 2004 08:39

Post by Alex » Tue 27 Sep 2005 07:22

We couldn't reproduce your problem, please specify the SQL statements that you load to script

carrieri
Posts: 7
Joined: Mon 26 Sep 2005 17:35

Post by carrieri » Tue 27 Sep 2005 17:35

I think I´ve found the problem. All procedures have a prompt statement as their first line:

Code: Select all

prompt XXXXX
create or replace procedure XXXXX is
begin
  ......
end;
/
Removing prompt statement, the program works fine. Shouldn´t prompt be ignored by TOraScript?

Thanks

Alex
Posts: 655
Joined: Mon 08 Nov 2004 08:39

Post by Alex » Thu 29 Sep 2005 08:48

TOraScript sends your SQL statement directly to the server. Thus when TOraScript tries to execute the first script we get the following error "ORA-00900: invalid SQL statement". The same error we get for all others files. We couldn't reproduce your problem. If it is possible please send us a small demo program with your scripts.

Post Reply