Script parser executes comments

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
upscene

Script parser executes comments

Post by upscene » Mon 21 Mar 2005 10:08

Hi there,

When testing this script:

Code: Select all

INSERT INTO BLABLABLA(C1, C2) VALUES (999, 10095582);
commit;
/* 1000 row(s) exported */
I noticed the following:

the /* ... */ part gets executes as a new statement. For some reason, Oracle returns the error:
---------------------------
Error
---------------------------
Script Error:
ORA-00900: invalid SQL statement

Is this a parser error?

--
Martijn Tonies
Upscene Productions

Paul
Posts: 725
Joined: Thu 28 Oct 2004 14:06

Post by Paul » Mon 21 Mar 2005 11:41

ODAC sends every part of script (SQL request) to Oracle server. You divided the comment to the separate SQL request by inserting ';' before them. Comment without statment is not valide SQL for Oracle server. We will correct this behavior of TOraScript in the next build.

upscene

Post by upscene » Mon 21 Mar 2005 13:29

Hello Paul,

Right - I understand the problem. IMO, the script parser should ignore the comment. I'm glad you're modifying the script component.

Thanks.

--
Martijn Tonies
Upscene Productions

Post Reply