Subject Cannot add a column constraint with another connection open?
Author phil_hhn
Hi, I have one java application open & connected to a FB1.5 database.

I start a second java application (connect to the same db) which
executes an alter table command to add column Blah_pk (Integer) to
table Fred. I can commit the transaction with no problem.
Then I add a constraint to the new column - Blah_pk is the pk of table
Bob. When I try to commit this I receive a firebird exception telling
me that table Bob is in use.

The first application is connected but it hasn't yet performed any
queries. If I stop the first application before starting the second,
then the second can do everything without receiving any errors.

It seems I cannot add a column constraint to an existing table if
another application is connected to the database. Is this correct?

One other thing I noticed (with the first app running) - the second
app can add two new tables A and B, create an n-n cross-reference
table between them; add fk,pk constraints and commit and no errors

Is it that firebird doesn't allow the second app to do things which
may affect system tables that may affect the first application?