INFO: When Table Name Is Available Using ADO, RDO, DAO (204848)
The information in this article applies to:
- ActiveX Data Objects (ADO) 2.0
- ActiveX Data Objects (ADO) 2.01
- ActiveX Data Objects (ADO) 2.1 SP2
- ActiveX Data Objects (ADO) 2.5
- ActiveX Data Objects (ADO) 2.6
- ActiveX Data Objects (ADO) 2.7
- Microsoft Visual Basic Enterprise Edition for Windows 5.0
- Microsoft Visual Basic Enterprise Edition for Windows 6.0
This article was previously published under Q204848 SUMMARY
It is sometimes desirable to retrieve the sourcetable name for a given field in a query. This can be important for a join query when two tables have fields with the same name.
Table name is not always available when using ADO, RDO, or DAO cursors. Availability depends on the cursor type. When you are using ADO, it also depends on the provider.
In RDO, sourcetable name will not be available if the Cursordriver property of the rdoenvironment is set to rdUseOdbc or rdUseNone. Likewise, in DAO when using odbcdirect, the sourcetable name will not be available if the defaultcursordriver is set to dbUseOdbc or dbUseNoCursor. When using DAO with JET workspaces, the sourcetable name always seems to be available for the allowable combinations of type, options, and lockedits.
In ADO, when using the MSDASQL or the SQLOLEDB providers there is no selection for odbc, and the sourcetable called BASETABLENAME is always available except for the adopenforwardonly and adlockreadonly combination when using the serverside cursor.
Modification Type: | Major | Last Reviewed: | 11/3/2003 |
---|
Keywords: | kbDatabase kbinfo KB204848 |
---|
|