Same project with PgConnection, PgQuery, DataseProvider but with a master-detail relation between two ClientDataset.
Code: Select all
with ClientDataSet1 do begin
if Active then Close;
CommandText:=
'select STITEMID, TITEMID from SUBTITEM';
Open;
end;
with ClientDataSet2 do begin
if Active then Close;
CommandText:=
'select s.STITEMID, s.TITGRCODE, s.TITGRNAME '+
'from SUBTITEM s '+
'union '+
'select s.STITEMID, '''' TITGRCODE, s.TITGRNAME '+
'from SUBTITEM s ';
Open;
end;
At the opening time raise the above error.
Even I replace '''' with null, gives the same error.
The table is
CREATE TABLE subtitem
(
stitemid integer NOT NULL,
titemid integer NOT NULL,
titgrcode character varying(25) NOT NULL,
titgrname character varying(100) NOT NULL,
titgrdesc character varying(200),
stitemtype smallint DEFAULT 0,
CONSTRAINT pk_subtitem PRIMARY KEY (stitemid)
)
Thank you
Radu B.