ADOAdapterObject 인터페이스
Microsoft ActiveX Data Objects/OLEDB 데이터 원본에 대한 연결을 나타냅니다.
네임스페이스: Microsoft.Office.Interop.InfoPath
어셈블리: Microsoft.Office.Interop.InfoPath(microsoft.office.interop.infopath.dll)
구문
<GuidAttribute("096CD5D3-0786-11D1-95FA-0080C78EE3BB")> _
<CoClassAttribute(GetType(ADOAdapterObjectClass))> _
Public Interface ADOAdapterObject
Inherits ADOAdapter2
Dim instance As ADOAdapterObject
[GuidAttribute("096CD5D3-0786-11D1-95FA-0080C78EE3BB")]
[CoClassAttribute(typeof(ADOAdapterObjectClass))]
public interface ADOAdapterObject : ADOAdapter2
주의
이 형식은 COM 상호 운용성을 위해 관리 코드에 필요한 coclass에 대한 래퍼입니다. 이 coclass에 의해 구현되는 COM 인터페이스의 구성원에 액세스하려면 이 형식을 사용하십시오. 해당 구성원의 설명에 대한 링크를 비롯한 COM 인터페이스에 대한 자세한 내용은 다음을 참고하십시오. ADOAdapter2.
ADOAdapter 개체는 데이터를 검색하여 외부 데이터 원본으로 전송하는 데 필요한 모든 정보가 있는 일종의 Microsoft Office InfoPath 2007 데이터 어댑터입니다.
ADOAdapter 개체는 데이터 어댑터의 연결 문자열, SQL 명령 텍스트 및 시간 초과 값에 대한 정보를 가져오거나 설정하는 데 사용할 수 있는 속성을 제공합니다. 또한 지정된 XML 노드의 특성을 기반으로 하여 SQL 명령 텍스트 조각을 만드는 메서드를 제공합니다.
ADO/OLEDB 데이터 원본을 양식의 기본 데이터 원본으로 사용하면 XDocument 개체의 QueryAdapter 속성을 통해 ADOAdapter 개체에 액세스할 수 있습니다.
예제
// retrieve the Employees Adapter from the DataAdapters collection
ADOAdapter employeesDA=(ADOAdapter)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();
참고 항목
참조
ADOAdapterObject 구성원
Microsoft.Office.Interop.InfoPath 네임스페이스