Share via


PivotCache.ADOConnection Property

Returns an ADO connection object if the PivotTable cache is connected to an OLE DB data source.

Namespace:  Microsoft.Office.Interop.Excel
Assembly:  Microsoft.Office.Interop.Excel (in Microsoft.Office.Interop.Excel.dll)

Syntax

'Declaration
ReadOnly Property ADOConnection As Object
    Get
'Usage
Dim instance As PivotCache
Dim value As Object

value = instance.ADOConnection
Object ADOConnection { get; }

Property Value

Type: System.Object

Remarks

The ADOConnection property exposes Microsoft Excel's connection to the data provider, allowing the user to write code within the context of the same session that Excel is using with ADO (relational source) or ADOMD (OLAP source).

The ADOConnection property is available only for sessions where the data source is an OLE DB data source. When there is no ADO session the query will result in a run-time error.

The ADOConnection property can be used for any OLEDB-based cache with ADO. The ADO connection object can be used with ADOMD for finding information about OLAP Cubes on which the cache is based.

See Also

Reference

PivotCache Interface

PivotCache Members

Microsoft.Office.Interop.Excel Namespace