Subject RE: [firebird-support] Re: Self Reference Error? Bug? Still Getting it
Author Thomas Steinmaurer
> Ok, this is kind of weird, but I am using Firebird 1.5 Release
> Candidate 8, and still getting the error for any relation now!
> my SQL File:
> ----------------------
> connect 'dbserver/3050:D:\DB\DBDataFile.gdb' user 'sysdba' password
> 'masterkey';
> create table ExampleTable (
> code integer not null primary key,
> name varchar(100) not null unique,
> parent integer);
> commit;
> alter table ExampleTable
> add constraint fk_parent
> foreign key (parent) references ExampleTable(code);
> commit;
> ----------------------
> I execute this using isql, and still getting the error:
> isql -i c:\temp\aa.sql
> Use CONNECT or CREATE DATABASE to specify a database
> Statement failed, SQLCODE = -607
> unsuccessful metadata update
> -object EXAMPLETABLE is in use
> Any idea what is going on? Is this a DB config param? Or is my db
> instance messed up?

There were some improvements in the "object ... is in use" area
in Firebird 1.5, but you still need to be the only one connected
to the database when creating FOREIGNKEY Constraints. So, are
there any other active connections available?

Best Regards,
Thomas Steinmaurer

Logging/Auditing Suite for InterBase and Firebird
Logging/Auditing Suite for Advantage Database Server