Subject Re: [firebird-support] Why object in use?
Author Ann W. Harrison
kimon_the_athenian2 wrote:
> Im not sure if first statement has to do with my problem at all but
> second statement generates "LOCATIONS is in use" error, but only
> sometimes. As far as I know there was only one connection to the
> database at this moment.

I think that you may be running into yourself. Creating a foreign key
requires that no active connection have a compiled statement that
references either table, including the one that's creating the new



That's not as crazy as it sounds. You could have a statement already
prepared that could violate the constraint you just defined. The
compiled request would not recognize the change to the database.