Subject RE: [firebird-support] Alter table error
Author Alan McDonald
> I would guess this is a newbie question.....
>
> ALTER TABLE cusmas ADD CONSTRAINT FK_CUSTOMER_SALESMAN_SALESMAN2 FOREIGN
> KEY (c_salem2) REFERENCES smnmas (sm_sid)
>
>
> I am getting this error:
> Error: Resource Exception. unsuccessful metadata update
> object SMNMAS is in use
> Reason: unsuccessful metadata update
> object SMNMAS is in use
>
> I shut the engine down and restarted it to be sure I was not connected
> to the db with another app and somehow locking the SMNMAS table.
>
> By the way, I know my table and field names stink.... I am porting an
> app that is 20 years old!!! It was originally written using ISAM files.
>
> What am I doing wrong?
>
> Thanks,
> Fred.

BTW - watch the long constraint name
FK_CUSTOMER_SALESMAN_SALESMAN2
it's 30 you only have 32 to play with - what charset is your db?
Alan