Subject info
Author Nico Speleers
Hello,

I have a problem with inserting a row in table OrderTypeDescriptions. Here you can find the sql script for the tables OrderTypes and OrderTypeDescriptions.


CREATE TABLE ORDERTYPES (

ID INTEGER GENERATED BY DEFAULT AS IDENTITY NOT NULL,

STOCKORDER BOOLEAN DEFAULT FALSE NOT NULL,

ROWVERSION TIMESTAMP,

/* Keys */

CONSTRAINT PK_ORDERTYPES

PRIMARY KEY (ID)

);



CREATE TABLE ORDERTYPEDESCRIPTIONS (

ID INTEGER GENERATED BY DEFAULT AS IDENTITY NOT NULL,

ORDERTYPEID INTEGER NOT NULL,

ORDERTYPEDESCRIPTION VARCHAR(100) COLLATE UNICODE_CI_AI,

LANGUAGEID INTEGER NOT NULL,

ROWVERSION TIMESTAMP,

/* Keys */

CONSTRAINT PK_ORDERTYPEDESCRIPTIONS

PRIMARY KEY (ID),

/* Foreign keys */

CONSTRAINT FK_ORDERTYPEDESC_LANGUAGEID

FOREIGN KEY (LANGUAGEID)

REFERENCES LANGUAGES(ID)

ON DELETE CASCADE,

CONSTRAINT FK_ORDERTYPEDESC_ORDERTYPEID

FOREIGN KEY (ORDERTYPEID)

REFERENCES ORDERTYPES(ID)

ON DELETE CASCADE

);



CREATE INDEX IX_ORDERTYPEDESC_DESCRIPTION

ON ORDERTYPEDESCRIPTIONS

(ORDERTYPEID, LANGUAGEID);

Screenshot of a row in table OrderType. Here we have no problem.
[cid:image001.png@...48D970]

Screenshot of a row in table OrderTypeDescriptions
[cid:image002.png@...48D970]

After insert I've got following error.
[cid:image003.png@...48D970]

Nico Speleers
Team Lead Analyse & Consultancy





Carfac bvba

[Beschrijving: Beschrijving: Beschrijving: CarfacAS (klein)]<http://www.carfac.be/>Driving on experience


Ambachtstraat 8 | 9700 Oudenaarde
Tel. +32 55 23 00 00 | Fax +32 55 31 00 95
nico.speleers@...<mailto:nico.speleers@...> | www.carfac.be<http://www.carfac.be/>

[Facebook]<http://www.facebook.com/groups/120709181286476/>[LinkedIn]<http://www.linkedin.com/company/hdc-software-nv>[Twitter]<https://twitter.com/carfacbvba>






[Non-text portions of this message have been removed]