Subject RE: [ib-support] object is in use error while adding foreign key
Author Bill Meaney
I recently had the same problem and got the following from Ann Harrison.


====================================
Foreign keys must be recognized and respected as soon
as they are created, just as indexes are. For indexes,
a special page called the root page is used to notify
all processes that have an interest in the table that
an index has been added. Because foreign keys do not
have a similar mechanism, the locking requirements to
create them are quite restrictive. My suggestion is that
you create tables, detach, reattach, then create foreign
key constraints.


Regards,

Ann
www.ibphoenix.com
We have answers.
====================================


> Hi all,
>
> I am trying to create a new table through my application and add a foreign
> key reference to
> an existing table.
>
> I am getting the error - metadata update unsuccessful - objet
> [existing_table_name] in use.
>
> Can anyone tell me whats happening here , please?
>
> None of the other connections are being used to query/or update
> the existing
> table!!
>
> Thanks in advance !
> amrita .
>