Subject RE: [IBO] Scripting problem
Author Thomas Steinmaurer
> The error pops up right after drop constraint row and there is commit before it
>
> > > commit;
> > >
> > > ALTER TABLE CORRESP DROP CONSTRAINT CORRESP_PK;

I'm a bit confused now, because your error message

ISC ERROR CODE:335544349
ISC ERROR MESSAGE:
attempt to store duplicate value (visible to active transactions) in unique index "RDB$PRIMARY60"
null segment of UNIQUE KEY

looks more like your compound primary key includes a "NULLable" column. Are you sure
that the above line causes the problem?

Why does it work in IBAdmin then? Well, I guess it has enabled a kind of AUTO COMMIT
on DDL statements.

Try to put a COMMIT after *each* DDL statement and re-run the script and see if
that helps.


Regards,
Thomas Steinmaurer
http://www.iblogmanager.com