ADO field... retrieve table

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

If I have an ADO recordset that was retrieved from a SQL Select statement, how do I determine the table name associated with a particular field?

For example if it was "Select [xxx] from [yyy]", then I want something like adoRecordset.Field("xxx").tablename to return yyy
 
Discovered the answer on my own: gadoRecordset.Fields("FieldName").Properties("BASETABLENAME").value is the right syntax. The recordset must be opened and connected, however. I was getting nulls when I simply retrieved the recordset with the execute method.
 
Back
Top