Subject | Re: [IBO] Problem with script |
---|---|
Author | Helen Borrie |
Post date | 2004-09-24T09:23:09Z |
At 11:54 AM 24/09/2004 +0300, you wrote:
Helen
>I use IBO4.2 Ib, BCB5Null segments are not allowed in IB 6.0, nor in Firebird 1.0.x.
>
>I run TIB_Script:
>
>SET AUTODDL ON;
>ALTER TABLE CORRESP add COL Varchar(35) NOT NULL;
>commit;
>update corresp set col='';
>update corresp set cref='' where cref is null;
>update corresp set col=cref;
>commit;
>alter table corresp drop cref;
>alter table corresp add CREF Varchar(35) NOT NULL;
>commit;
>update corresp set cref=col;
>commit;
>alter table corresp drop col;
>commit;
>alter table corresp drop CONSTRAINT CORRESP_PK;
>commit;
>alter table corresp ADD CONSTRAINT CORRESP_PK PRIMARY KEY
>(NAME,ACCOUNT,SUBACCOUNT,CREF);
>commit;
>
>(The extra commits were added in desperation to get it to work.)
>
>In Firebird servers this script works perfectly.
>When using IB 6.0, I get error in last row (ADD CONSTRAINT):
> ISC ERROR: 335544349
> Attempt to store duplicate value (...) in unique index
>"RDB$PRIMARY43"
> Null segment of UNIQUE KEY
>Strange thing is that when I run this script in IBAdmin or IB Manager,Runs OK with IB 6.)???????
>then I don't get this error - the script runs OK.
Helen