Subject Re: [firebird-support] Why does the following
Author Helen Borrie
At 04:30 PM 5/03/2004 +0100, you wrote:

>Everything seems to work, except when it as last action of the script tries
>to execute the following line:
>
> /* Found Referential Integrity Constraint riArtCode For Table Efas.db */
> ALTER TABLE "EFAS" ADD CONSTRAINT "RIARTCODE"
> FOREIGN KEY ("ARTCODE1", "ARTCODE2")
> REFERENCES "EFA" ("ARTCODE1", "ARTCODE2") ON UPDATE CASCADE;
>
>I did manage to execute and commit all previous sql statements.
>
>This sql statement however seems to be executed correctly, but when I try
>to commit the action, I get a
>'unsuccessful metadata update
>object EFA in use'
>
>error.
>
>Both the tables EFAS and EFA do exist, the RIARTCODE constraint does not,
>and all fields do exist as well.
>
>Mind you, I am a Firebird primer.

This will "take" eventually. Objects remain "in use" even if another
transaction is just reading them. I suspect you have some kind of client
tool that you are using to "watch" the effects of your script. Hard-commit
its transaction and don't refresh your view of the tables, and the "Object
in use" messages will go away.

/hb