Subject Re: [IBO] very strange problem with ib_script
Author Helen Borrie
At 05:49 PM 1/06/2006, you wrote:
>Helen,
>
>many thanks for your answer.
>
> > IOBManager (?) must be running in an Autocommit transaction.
>
>Sorry, little mistake: It should be IBManager.
>
> > That is how it is meant to work.
>
>For I can not be sure, that there is allways a commit in the script,
>where it should be, I now use the OnStatement Event of the IB_Script
>to commit each Statement. I know, this event is fired before the
>execution of every statement, but any way I commit after
>ib_script.execute.
>In the OnError event of the ib_script, I fill a stringlist with the
>errormessages and set raiseexception to false.
>So now the script is running to the end, no matter if there is an
>error in it or not, and I get all errors after the execution.
>I think this is a good solution for me.
>Do you see any problems with my approach to this?

On the surface, yes.

My main caution is about running DDL and DML in the same script. I
would rather run the DDL script, committing and intercepting the
exceptions and finally setting a flag to tell the application whether
it is safe to proceed with the second script.

>My first tests worked very well.

Throw some bad conditions at it and see how well it works.

Helen