I'm using Delphi7, Devart's dbExpress driver 4.70.
I drop two TSQLTables (call them A
and B
), two TDataSetProviders (dspA
and dspB
), two TClientDataSets (cdsA
and cdsB
), two TDataSources (dsA
and dsB
) and two DBGrids (gridA
and gridB
). Everything is set fine. If I set cdsA.Active
to true I can see the data in gridA
. The same per cdsB
.
Now I want to implement the relation
A JOIN B ON a = b.
The field a
is the true A
's foreing key referred by B
's field b
and b
is B
's primary key too. I set the stuff as follow (I use graphic tools):
cdsB.MasterSource := dsA;
cdsB.MasterFields := a;
cdsB.IndexFieldNames := b;
When I do cdsB.Open
, I got this error:
ORA-01036: illegal variable name/number".
The field a
value is always null
in table A (there is no data). TSQLMonitor reports the following queries:
Execute: select * from A
...
Execute: select * from ENTI where (b is NULL)
:1 (Number,IN) = <NULL>
What did I miss, and how can this be fixed?