AMBIGUOUS FIELD IN JOIN
Posted: Fri  06 Nov 2015 17:21
				
				Hi
ususally I access field with TMyTable component and field name, i.e.
MySqlDataset: TMyTable;
MyField : String;
....
... connect command
.....
MySqlDataset.SQL.Text:='SELECT * FROM MyTable';
MySqlDataset.execute;
MyField := MysqDataset['Fieldname']
This don't work when I have a Mysql Join COMMAND bewteen two tables, and I need to access
a field with has the same name both table, ie
MySQLDataset.text :='SELECT * FROM receivers LEFT JOIN satellites ON receivers.antenna=satellites.id ');
MySqlDataset.execute;
MyField := MysqDataset['satellites.id']
I got an error, unknow fields...
Where I'm wrong ?
Thanks alot
cu
			ususally I access field with TMyTable component and field name, i.e.
MySqlDataset: TMyTable;
MyField : String;
....
... connect command
.....
MySqlDataset.SQL.Text:='SELECT * FROM MyTable';
MySqlDataset.execute;
MyField := MysqDataset['Fieldname']
This don't work when I have a Mysql Join COMMAND bewteen two tables, and I need to access
a field with has the same name both table, ie
MySQLDataset.text :='SELECT * FROM receivers LEFT JOIN satellites ON receivers.antenna=satellites.id ');
MySqlDataset.execute;
MyField := MysqDataset['satellites.id']
I got an error, unknow fields...
Where I'm wrong ?
Thanks alot
cu