Subject object is in use
Author goodieauk
Hi
I have a Delphi app. That connects to either IB5.6 or IB6 ( depending
on the customer).
The application is around three years old and has evolved at lot due
to customer requests.
As a result we are regularly updating the metadata of the IB
databases.
To do this we have an a start up routine on the app that checks a
Database Table. This table contains information about the version
number of the application currently installed.
The start up routine then checks to see if any updates to the meta
data are required. If updates are required the appropriate SQL is
run from Delphi. We are using Standard components
Connecting via the BDE. All the components are wrapped in a single
TDATABASE which has a TSESSION associated to it.
Each SQL statement is a separate transaction with explicit calls for
Commit.

The problem I have is that on some databases we will get `OBJECT IS
IN USE' Metadata errors when changing or creating a FOREIGN KEY.

I know there is an issue in that IB require exclusive access to the
GDB if you are creating foreign keys ( Knowledgebase id81).
However from what we can see we are creating only one connection,
obviously we ensure only one users tries to connect to run the update.

Does anyone have any ideas.

Regards
Andy Goodchild
Nextgen Computing Ltd
www.nextgencomputing.com