Subject Re: [Firebird-Java] Constraint problem when there should be none
Author Евгений Путилин
Hi John
> Embedded Firebird 1.5.3
> jaybird 2.0.1
>
> I have a table:
> CREATE TABLE ORDERED (
> ORDER_ID BIGINT NOT NULL,
> .... some basic fields ...
> );
>
> and a constraint:
> ALTER TABLE ORDERED ADD PRIMARY KEY (ORDER_ID);
> this is the integ_85 contstraint referred to below
>
> I try to update the following lines in non-autocommit mode:
> st.executeUpdate("ALTER TABLE ORDERED ADD ADDITIONAL_PRICE BIGINT
> DEFAULT 0 NOT NULL");
> st.executeUpdate("UPDATE ORDERED SET ADDITIONAL_PRICE = 0");
>
> And I get the following error:
>
> org.firebirdsql.jdbc.FBSQLException: GDS Exception. 335544665.
> violation of PRIMARY or UNIQUE KEY constraint "INTEG_85" on table
> "ORDERED"
.....
>
> Is this normal?
What you undestund about normal? IMHO this question about Firebird 1.5.3 not Jaybird.
Firebird under 2.0(not include 2.0) allow to work with data with modified and not commited metadata.

I have question column ORDER_ID containts unique or not unique values?

WBR Evgeny Putilin.