I'm using this SQL statement to retrieve some records from a Firebird DB and to insert an 'empty' record for each CLIENT and LANGU:
Code: Select all
select * from pricelist
union
select client, langu, NULL, NULL, NULL, NULL, NULL, NULL from pricelist
Code: Select all
CREATE TABLE PRICELIST
(
CLIENT DCLNT NOT NULL,
LANGU DLANGU NOT NULL,
PRICELIST DPRICELIST NOT NULL,
TEXT DPRICELISTDESC ,
CREATED DCREATED ,
CREATED_BY DCREATED_BY ,
CHANGED DCHANGED ,
CHANGED_BY DCHANGED_BY ,
CONSTRAINT PK_PRICELIST PRIMARY KEY (CLIENT, LANGU, PRICELIST)
);
ClientDataSet.Fielddefs[1].Required is set to True, too, for field LANGU.
But ClientDataSet.Fielddefs[2].Required is set to False, although it is part of the primary key. Why this?
Using this SQL statement:
Code: Select all
select * from pricelist
union
select client, langu, pricelist, NULL, NULL, NULL, NULL, NULL from pricelist
So how can I get the Required property correctly set to true?