Subject Re: [Firebird-Java] Creating unique column entries
Author Laurent Duperval
Roman Rokytskyy wrote:

>As far as I remember, constraints are evaluated on commit. So, if you set
>auto-commit to false, you will get exception only when you commit data. Is
>it your case?
>
>
>

No. I tested it under DbVisualizer and running the straight SQL query
produces the same result.... Actually, I notice now that even using
isql.exe does not cause a problem. I thought it was a problem with my
syntax so I tried:

CREATE TABLE Vehicle
(
Id char(10),
Name varchar(32) NOT NULL ,
CONSTRAINT PK_Vehicle PRIMARY KEY (Id),
CONSTRAINT UNQ_VEHICLE_NAME UNIQUE (NAME)
);

but it still accepts duplicate names. It isn't a Jaybird problem.

It almost looks like a bug but before reporting it as such and making a
fool of myself, is there anywhere else I should turn to for this?

L