Subject Re: [IBO] Bug with scripts and cacheing of database structure?
Author Geoff Worboys
> I use two TIB_Script-Components to do some changes.

> 1st Script has some DDL-Statements. One of the statement is to add a
> field to a table
> 2nd Script has DML statements. One is to update the newly added
> field with Script 1.

> The error was that the wrong field was updated. Like Update Test Set
> Field3 = 1 but instead of Field3 Field2 was updated.

> The error doesn't occur,
> - when I disconnect and connect between Script 1 and 2

My first reaction is:

Its not a bug its just the result of IBO not being able to tell that
the structure has changed. There is no "event" automatically
generated by IB/FB to tell clients when structures change and so the
cached ddl details become out of date and need to be refreshed.

You can disconnect/connect (but this only works if you DONT use
IB_Connection.SchemaCacheDir). Or you can use

There is a way to set things up with a special IBO$SCHEMA_VERSION
table, but I think that only works between disconnect/connect.

My second thoughts include:

You say that
> The error doesn't occur,
> - by using an older version of IBObjects (Version of Feb./March
> 2002)

And I would not have thought there would have been any difference.

I am curious about the fact that a DML statements in a script are
impacted by the schemacache. Normally I would have expected these to
have been executed directly and would not have been impacted by the
IBO schemacache.

Are you sure that no other changes have occurred in between times?
Perhaps a change of IB/FB server version? Are you actually able to
install the older version in your current setup and prove that the
older IBO version is unaffected?

There are lots of issues relating to dynamic DDL changes in IB/FB and
the fact that you are unable to reproduce the problem in a simpler
configuration makes me wonder whether it is really a schemacache
problem. Try using the InvalidateAllItems method mentioned above, if
that does not work then I suspect the problem may be server based and
not client based.

I think we will really need a workable example of the problem to take
this much further.

Geoff Worboys
Telesis Computing