#1 mORMot 1 » SynOleDB » 2014-08-05 08:36:27

Ronald
Replies: 1

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

Board footer

Powered by FluxBB