DataObject.QueryAdapter Property

Definition

Gets a reference to the data adapter object that is used for a secondary data source.

public:
 property System::Object ^ QueryAdapter { System::Object ^ get(); };
public object QueryAdapter { get; }
member this.QueryAdapter : obj
Public ReadOnly Property QueryAdapter As Object

Property Value

Examples

In the following example, the QueryAdapter property of the DataSourceObject object is used to return a reference to the data adapter that is associated with the DataSourceObject object, which, in this case, is an ADOAdapter data adapter object. The code then uses the Command property of the ADOAdapterObject object to display the SQL command text in a message box:

ADOAdapter adapter;
adapter = (ADOAdapter) thisXDocument.DataObjects["CityList"].<span class="label">QueryAdapter</span>;
thisXDocument.UI.Alert("SQL command text: " + adapter.Command);

Remarks

After you have set a reference to the data adapter object that the QueryAdapter property returns, you can use the properties and methods that the particular data adapter object contains.

Applies to