ArcObjects Library Reference (DataSourcesOleDB)  

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,
  LPUNKNOWN* pADOConnection
);
[C++]

Parameters

pWorkspace [in]

  pWorkspace is a parameter of type IWorkspace

pADOConnection [out, retval]   pADOConnection is a parameter of type LPUNKNOWN

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