Edit

Share via


ADOAdapterObject Interface

Definition

Represents a connection to a Microsoft ActiveX Data Objects/OLEDB data source.

public interface class ADOAdapterObject : Microsoft::Office::Interop::InfoPath::ADOAdapter2
[System.Runtime.InteropServices.Guid("096CD5D3-0786-11D1-95FA-0080C78EE3BB")]
public interface ADOAdapterObject : Microsoft.Office.Interop.InfoPath.ADOAdapter2
type ADOAdapterObject = interface
    interface ADOAdapter2
Public Interface ADOAdapterObject
Implements ADOAdapter2
Derived
Attributes
Implements

Examples

// retrieve the Employees Adapter from the DataAdapters collection
<span class="label">ADOAdapter</span> employeesDA=(<span class="label">ADOAdapter</span>)thisXDocument.DataAdapters["Employees"];
// get employee’s ID from the main DOM
string employeeID=thisXDocument.DOM.selectSingleNode("//my:field2").text;
// Change the ADOAdapter’s command to retrieve the record of the Employee’s ID entered
// by the user
employeesDA.Command="select * from Employees where EmployeeID="+employeeID;
// get DataObject from the DataObjects collection and call Query to refresh
// the data object
DataObject employeesDO=thisXDocument.DataObjects["Employees"];
employeesDO.Query();

Remarks

This type is a wrapper for a coclass that is required by managed code for COM interoperability. Use this type to access the members of the COM interface implemented by this coclass. For information about the COM interface, including a link to descriptions of its members, seeADOAdapter2.

The ADOAdapter object is a type of Microsoft InfoPath data adapter that contains all the information necessary for retrieving and submitting data to an external data source.

The ADOAdapter object provides properties that can be used to get and set information about the data adapter's connection string, SQL command text, and timeout value. It also provides a method for creating a SQL command text fragment based on a specified XML node's attributes.

If an ADO/OLEDB data source is used as the primary data source for a form, the ADOAdapter object is accessible through the QueryAdapter property of the XDocument object.

Properties

Command

Gets or sets the SQL command string text for an ADOAdapterObject object.

(Inherited from ADOAdapter2)
Connection

Gets or sets the connection string used for an ADOAdapterObject object.

(Inherited from ADOAdapter2)
Name

Gets the name of an ADOAdapterObject object.

(Inherited from ADOAdapter2)
QueryAllowed

Returns true, corresponding to the queryAllowed attribute in the form definition file (.xsf).

(Inherited from ADOAdapter2)
SubmitAllowed

Returns a value corresponding to the submitAllowed attribute in the form definition file (.xsf).

(Inherited from ADOAdapter2)
Timeout

Gets or sets the timeout value for an ADOAdapterObject object.

(Inherited from ADOAdapter2)

Methods

BuildSQLFromXMLNodes(IXMLDOMNode)

Returns a SQL command text fragment using the specified XML node.

(Inherited from ADOAdapter2)
Query()

Reads data from the associated data adapter.

(Inherited from ADOAdapter2)
Submit()

Executes the submit operation on the associated data adapter.

(Inherited from ADOAdapter2)

Applies to