Subject Re: Unknown token CREATE
Author edcurren
Hi Luc,

I did try a rename after disconnecting and it took about 5 or 6
seconds before it allowed me to rename the file. A bit more
information... My current setup is that my application is using the
fbembed.dll (renamed to fbclient.dll). I have searched my system
(which is not networked) for other instances of fbclient.dll and have
found none.

Again, thanks to everyone for your time and help with this.
Ed

--- In firebird-support@yahoogroups.com, Lucas Franzen <luc@r...>
wrote:
>
>
> edcurren schrieb:
> > Ugh! I've seperated the statements and am now running them
through
> > one at a time. However when I get to a CREATE TABLE statement
that
> > has a FOREIGN KEY contstraint to a table created 3 sql statments
> > prior, I get the following error:
> >
> > This operation is not defined for system tables.
> > unsuccessful metadata update
> > object CUSTOMERS is in use
> >
> > The code does a full attach_db, create_stmt, prep_stmt, execute,
> > commit, detach_db cycle for each sql statement. I'm lost folks,
and
> > in desperate need of help.
>
> in that case (that you detached the db) the problem occurs from
another
> opened connection which prevents you from having single acess to
the
> database. This is required when adding a foreign key constraint.
>
> If you think there might be the sth. wrong with detaching, you can
test
> by trying to rename the database file right after detaching ;-)
>
>
> Luc.