Subject Re: [IBO] Creating tables with script
Author Helen Borrie
At 02:34 PM 04-01-01 +0200, you wrote:
>Hi and HNY!
>
>I create new table with TIB_Script->Execute(). After that I want to enter
>new record to it, but get error "Unable to insert row").
>When I run my program next time (the table is already created), then insert
>is successful.
>
>What must I call after executing script? I tried Trans->CommitRetaining(),
>but that didn't help.


CommitRetaining isn't what you want here because you need a completely new
transaction context.

Call Commit to end the transaction.

After that, start a new transaction. You'll also need to check that your
Insert statement is prepared before trying to do DML on a new table.

H.

All for Open and Open for All
InterBase Developer Initiative ยท http://www.interbase2000.org
_______________________________________________________