This document is archived and information here might be outdated.  Recommended version.


IFDOToADOConnection.CreateADOConnection Method (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > DataSourcesOLEDB > ESRI.ArcGIS.DataSourcesOleDB > Interfaces > IF > IFDOToADOConnection Interface > IFDOToADOConnection.CreateADOConnection Method
ArcGIS Developer Help

IFDOToADOConnection.CreateADOConnection Method

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
);
[C++]
Parameters
pWorkspace [in]

pWorkspace is a parameter of type IWorkspace*

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Remarks

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.

[C#]

// Create an ADO connection to the access workspace
IFDOToADOConnection fdoToadoConnection = new FdoAdoConnectionClass();
ADODB.Connection adoConnection = (ADODB.Connection)fdoToadoConnection.CreateADOConnection(workspace);

See Also

IFDOToADOConnection Interface | IWorkspace Interface | IWorkspaceFactory Interface