DBConnection Class
Specifies all properties associated with an ODBC or OLE DB external data connection.
Inheritance Hierarchy

Namespace: Aspose.Cells.ExternalConnections
Assembly: Aspose.Cells (in Aspose.Cells.dll) Version: 19.10.0.0 (19.10)
Syntax
public class DBConnection : ExternalConnection

The DBConnection type exposes the following members.

Properties
  NameDescription
Public propertyBackgroundRefresh
Indicates whether the connection can be refreshed in the background (asynchronously). true if preferred usage of the connection is to refresh asynchronously in the background; false if preferred usage of the connection is to refresh synchronously in the foreground.
(Inherited from ExternalConnection.)
Public propertyCommand
The string containing the database command to pass to the data provider API that will interact with the external source in order to retrieve data
Public propertyCommandType
Specifies the OLE DB command type. 1. Query specifies a cube name 2. Query specifies a SQL statement 3. Query specifies a table name 4. Query specifies that default information has been given, and it is up to the provider how to interpret. 5. Query is against a web based List Data Provider.
Public propertyConnectionDescription
Specifies the user description for this connection
(Inherited from ExternalConnection.)
Public propertyConnectionId
Specifies The unique identifier of this connection.
(Inherited from ExternalConnection.)
Public propertyConnectionInfo
The connection information string is used to make contact with an OLE DB or ODBC data source.
Public propertyCredentials Obsolete.
Specifies the authentication method to be used when establishing (or re-establishing) the connection.
(Inherited from ExternalConnection.)
Public propertyCredentialsMethodType
Specifies the authentication method to be used when establishing (or re-establishing) the connection.
(Inherited from ExternalConnection.)
Public propertyId
Gets the id of the connection.
(Inherited from ExternalConnection.)
Public propertyIsDeleted
Indicates whether the associated workbook connection has been deleted. true if the connection has been deleted; otherwise, false.
(Inherited from ExternalConnection.)
Public propertyIsNew
True if the connection has not been refreshed for the first time; otherwise, false. This state can happen when the user saves the file before a query has finished returning.
(Inherited from ExternalConnection.)
Public propertyKeepAlive
True when the spreadsheet application should make efforts to keep the connection open. When false, the application should close the connection after retrieving the information.
(Inherited from ExternalConnection.)
Public propertyName
Specifies the name of the connection. Each connection must have a unique name.
(Inherited from ExternalConnection.)
Public propertyOdcFile
Specifies the full path to external connection file from which this connection was created. If a connection fails during an attempt to refresh data, and reconnectionMethod=1, then the spreadsheet application will try again using information from the external connection file instead of the connection object embedded within the workbook.
(Inherited from ExternalConnection.)
Public propertyOnlyUseConnectionFile
Indicates whether the spreadsheet application should always and only use the connection information in the external connection file indicated by the odcFile attribute when the connection is refreshed. If false, then the spreadsheet application should follow the procedure indicated by the reconnectionMethod attribute
(Inherited from ExternalConnection.)
Public propertyParameters
Gets ConnectionParameterCollection for an ODBC or web query.
(Inherited from ExternalConnection.)
Public propertyReconnectionMethod Obsolete.
Specifies what the spreadsheet application should do when a connection fails. The default value is ReConnectionMethodType.Required.
(Inherited from ExternalConnection.)
Public propertyReconnectionMethodType
Specifies what the spreadsheet application should do when a connection fails.The default value is ReConnectionMethodType.Required.
(Inherited from ExternalConnection.)
Public propertyRefreshInternal
Specifies the number of minutes between automatic refreshes of the connection.
(Inherited from ExternalConnection.)
Public propertyRefreshOnLoad
True if this connection should be refreshed when opening the file; otherwise, false.
(Inherited from ExternalConnection.)
Public propertySaveData
True if the external data fetched over the connection to populate a table is to be saved with the workbook; otherwise, false.
(Inherited from ExternalConnection.)
Public propertySavePassword
True if the password is to be saved as part of the connection string; otherwise, False.
(Inherited from ExternalConnection.)
Public propertySourceFile
Used when the external data source is file-based. When a connection to such a data source fails, the spreadsheet application attempts to connect directly to this file. May be expressed in URI or system-specific file path notation.
(Inherited from ExternalConnection.)
Public propertySSOId
Identifier for Single Sign On (SSO) used for authentication between an intermediate spreadsheetML server and the external data source.
(Inherited from ExternalConnection.)
Public propertyType
Gets or Sets the external connection DataSource type.
(Inherited from ExternalConnection.)
Methods
  NameDescription
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
See Also