OLEDBConnection.MaintainConnection Property
Returns True if the connection to the specified data source is maintained after the refresh operation and until the workbook is closed. Read/write Boolean.
Namespace: Microsoft.Office.Interop.Excel
Assembly: Microsoft.Office.Interop.Excel (in Microsoft.Office.Interop.Excel.dll)
Syntax
'Declaration
Property MaintainConnection As Boolean
Get
Set
'Usage
Dim instance As OLEDBConnection
Dim value As Boolean
value = instance.MaintainConnection
instance.MaintainConnection = value
bool MaintainConnection { get; set; }
Property Value
Type: System.Boolean
Boolean
Remarks
The default value is True. If you anticipate frequent queries to a server, setting this property to True might improve performance by reducing reconnection time. Setting this property to False causes an open connection to be closed.