I use IBDac with Delphi to connect to Firebir db and suddenly when I tried to run the software I got this error
Dynamic SQL ErrorSQL error code = -206 Column unknown table1.MyField_ID At line 6, column 18
the error show up when I try to open the dataset
mydataset.open;
the column exists of course. it is a foreign key to another table. I really dont know why I get this error !! here is the SQL I used in the component:
CREATE TABLE table1 (
pkfield1 INTEGER NOT NULL,
field_no INTEGER NOT NULL,
fk1_id INTEGER NOT NULL,
fk2_id INTEGER,
MyField_ID INTEGER,
bfield INTEGER);
select
table1.pkfield1,
table1.field_no,
table1.fk1_id,
table1.fk2_id,
table1.MyField_ID, <<<------- the field that cause the error
table1.bfield,
table2.desc1,
table2.desc2,
table2.desc3
from table2
right outer join table1 on (table2.pk1_id = table1.fk1_id)
Order by table1.fk1_id, table1.field_no desc
Please advise
thanks