This document is archived and information here might be outdated. Recommended version. |
ArcObjects namespaces > DataSourcesOleDB > ESRI.ArcGIS.DataSourcesOleDB > Interfaces > IF > IFDOToADOConnection Interface > IFDOToADOConnection.CreateADOConnection Method (ArcObjects .NET 10.4 SDK) |
Creates an ADO connection from a Workspace.
[Visual Basic .NET] Public Function CreateADOConnection ( _ ByVal pWorkspace As IWorkspace _ ) As Object
[C#] public object CreateADOConnection ( IWorkspace pWorkspace );
[C++]
HRESULT CreateADOConnection(
IWorkspace* pWorkspace,
LPUNKNOWN* pADOConnection
);
[C++]
Parameters pWorkspace [in]
pWorkspace is a parameter of type IWorkspace pADOConnection [out, retval] pADOConnection is a parameter of type LPUNKNOWN
The CreateADOConnection method creates an ADO (ActiveX Data Objects) connection from a workspace object. The ADO connection object should not exist before this method is called.
// Create an ADO connection to the access workspace
IFDOToADOConnection fdoToadoConnection=new FdoAdoConnectionClass();
ADODB.Connection adoConnection=(ADODB.Connection)fdoToadoConnection.CreateADOConnection(workspace);
IFDOToADOConnection Interface | IWorkspace Interface | IWorkspaceFactory Interface