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
			
									
									
						AMBIGUOUS FIELD IN JOIN
Re: AMBIGUOUS FIELD IN JOIN
This is standard behavior for all the components and utilities. You should specify such fields explicitly in the query and create corresponding aliases for them.
			
									
									
						Re: AMBIGUOUS FIELD IN JOIN
standard ?
I have got also another Delphi component for MySql who manage
my problem.....
			
									
									
						I have got also another Delphi component for MySql who manage
my problem.....
Re: AMBIGUOUS FIELD IN JOIN
We meant the standard Delphi components. Please clarify: what components have another behavior?
			
									
									
						Re: AMBIGUOUS FIELD IN JOIN
I try you component and find it great, actually I only use this.
Some days ago I start converting an old project that was developed using
another similar component, not from devart, and it works using the syntax
of my first post (i.e. MyField := MysqDataset['satellites.id']) .
So I wrote here my question. I can send you in PM the name of the component
cu
			
									
									
						Some days ago I start converting an old project that was developed using
another similar component, not from devart, and it works using the syntax
of my first post (i.e. MyField := MysqDataset['satellites.id']) .
So I wrote here my question. I can send you in PM the name of the component
cu
Re: AMBIGUOUS FIELD IN JOIN
Please send the name of the components to  viktorv*devart*com.