Page 1 of 1

Script component ignores error?

Posted: Mon 28 Sep 2015 10:28
by upscene
Hi,

When executing this in a TIBCScript component, the OnError event isn't triggered.

Code: Select all

execute block returns (id int)
as begin
 execute statement 'dasdasda';
 suspend;
end
When executing this inside a TIBCQuery, an error is raised properly.

Any idea?

With regards,

Martijn Tonies
Upscene Productions

Re: Script component ignores error?

Posted: Wed 30 Sep 2015 08:31
by ViktorV
In your example, the execute block construct has a return value (returns (id int)), so TIBCQuery will execute it as a SELECT statement, and that will cause an error when trying to get the result. In TIBCScript, the error does not occur, since it is not designed to return the results of executed statements.
To verify this, you can remove the "returns (id int)" construct in your example, and the error will occur in both TIBCQuery and TIBCScript.