Subject Re: [IBO] tib_script
Author Paul Vinkenoog
Hi Rudi,

> Thank you, when i try to cath the error on the onerror event
> (Tib_Script)i note that never raise the error from it, the error was
> from the TIB_SyncCursor, it was prepare after tib_connection connect
> (the Tib_Script connect the Tib_connection to execute and i did't
> know it )

Yes, as soon as the database is succesfully created it connects. I
found out more or less the same way as you just did: because the
connection's AfterConnect handler was called and tried to do all kinds
of operations on an unfinished database :-)

> and TIB_SyncCursor looks for a dml table that was not created yet,
> when comment the line to prepare the TIB_SyncCursor the error
> disapear and the database is created perfect!!!

> now i have to place the TIB_SyncCursor.prepare in another place!!

Or you could turn on a flag (say, InCreateScript) in the script's
BeforeExecute handler and turn it off again in AfterExecute. And have
the code in Connection.AfterConnect check that flag.

Paul Vinkenoog