Subject | Re: [IBO] very strange problem with ib_script |
---|---|
Author | Helen Borrie |
Post date | 2006-05-31T11:08:22Z |
At 08:56 PM 31/05/2006, you wrote:
first. You should place a COMMIT; statement in your script.
Helen
>I now get an other, very strange problem with ib_script.IOBManager (?) must be running in an Autocommit transaction.
>
>When running a script which adds a new field to a table, and setting
>this field with a default value in the same script without a commit
>between the 2 statements, a totaly different field (even with an
>other field type) of the table is set with the default value.
>This is very strange.
>
>Here is an excerpt of the table I am going to modify in the script:
>
>create table rep
>(rep_id integer not null
> primary key,
> kurz varchar (15)
> not null,
> bez varchar (40)
> not null,
> bericht blob sub_type 0)
>
>Here is the script:
>
>set term ^;
>
>alter table rep
>add sys_rep char^
>
>update rep
>set sys_rep = 'F'^
>
>When I run this script in IOBManager, it works as expected.
>When I run it in my application with tib_script, it doesn't.You should never try to perform DML without committing the DDL
>After running it, the field bericht is set to 'F'.
first. You should place a COMMIT; statement in your script.
>This only happens, when I use a database on a server. Doing the sameThat is how it is meant to work.
>on a local database, it works well.
>
>If I run this script:
>
>set term ^;
>
>alter table rep
>add sys_rep char^
>
>commit ^
>
>update rep
>set sys_rep = 'F'^
>
>it works.
Helen