You are not logged in.
Hi,
I'm new to this forum and trying your SnyOleDB components.
I've a question to it: Is it possible to get the origin table and field names of a SQL statement?
With ADO and MS SQLServe you can use the following code
var
ado : TAdoDataSet;
orgTableName, orgFieldName : string;
begin
...
ado.SQL.Text := 'SLECT FIELD1 AS MYALIAS FROM TABLE1 AS T1';
...
orgTableName := ado.RecordSet.Fields.Items[0].Properties['BASETABLENAME'].Value;
orgFieldName := ado.RecordSet.Fields.Items[0].Properties['BASECOLUMNNAME'].Value;
Is this possible within SynOleDB?
Ronald
Offline
AFAIK it is not available.
The low-level column information is read in TOleDBStatement.BindColumns and converted into SynDB's TSQLDBColumnProperty record.
And there is no such information in TSQLDBColumnProperty, since it is an ADO-specific feature.
Sounds like if it is not working on all providers - see https://community.oracle.com/thread/417 … 0&tstart=0 - so you should perhaps better not rely on it...
Offline