Subject Re: [IBO] tib_script
Author rudi_josic
Hi Paul,

--- In, Paul Vinkenoog <paul@v...> wrote:
> Hi Rudi,

> > yes it has autoddl on!
> >
> > SET TERM ^ ;
> >
> OK. So that's not the cause of the problem. By the way, you can
> out the COMMITs after the DDL statements now.

> > yes is commited after the create table declaration!
> >

> I can think of two more possible causes:
> 1.
> Somewhere in your script you forgot the double quotes around the
> table name. It is then seen as case-insensitive and translated by
> server to "DML" (even if you spelled: dml). Table DML doesn't exist,
> hence the error.
> (Hmmm... that doesn't seem likely because you said the exact same
> script worked well in IB_SQL.)
> In connection to this: ask yourself if you *really really* need
> case-sensitive object names. If not, drop all the double quotes and
> save yourself a lot of headaches. You can spell Valor01 or VALOR01
> valor01 and it'll all mean the same thing.
> 2.
> You perform a DML statement - like inserting a record - upon table
> "dml". This can sometimes go wrong even if your DDL statements have
> been committed. The general "safe rule" is:
> - Put only DDL statements in your create script. And make sure to
> commit of course (but with AUTODDL on, that's been taken care of).
> - If you want to perform DML afterwards: first disconnect, then
> reconnect and run a second script.
> Another thing: you can use the TIB_Script's OnError event to find
> exactly at what point the error occurred. Make the event handler
> the SQL statement. The "Line 1" from the error message means the
> line of the statement, not of the script, so that doesn't help you
> much.
> If you still can't find the error, feel free to send me the script
> post it here (I think the list can handle it).
> Greetings,
> Paul Vinkenoog

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 ) 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!!

Thank you.