DBConnection
DBConnection class
Specifies all properties associated with an ODBC or OLE DB external data connection.
Properties
| Name | Type | Description |
|---|---|---|
| ClassType | Number | The value of the property is ExternalConnectionClassType integer constant. |
| ConnectionString | String | |
| ConnectionInfo | String | The connection information string is used to make contact with an OLE DB or ODBC data source. |
| PowerQueryFormula | PowerQueryFormula | Gets the definition of power query formula. |
| CommandType | Number | Specifies the OLE DB command type. 1. Query specifies a cube name 2. Query specifies a SQL statement 3. Query specifies |
| Command | String | The string containing the database command to pass to the data provider API that will interact with the external source |
| SeverCommand | String | Specifies a second command text string that is persisted when PivotTable server-based page fields are in use. For ODBC c |
| SecondCommand | String | |
| Id | Number | Gets the id of the connection. |
| ConnectionId | Number | Specifies The unique identifier of this connection. |
| Type | ConnectionDataSourceType | Gets or Sets the external connection DataSource type. |
| SourceType | ConnectionDataSourceType | |
| SSOId | String | Identifier for Single Sign On (SSO) used for authentication between an intermediate spreadsheetML server and the externa |
| SavePassword | boolean | True if the password is to be saved as part of the connection string; otherwise, False. |
| SaveData | boolean | True if the external data fetched over the connection to populate a table is to be saved with the workbook; otherwise, f |
| RefreshOnLoad | boolean | True if this connection should be refreshed when opening the file; otherwise, false. |
| ReconnectionMethodType | Number | Specifies what the spreadsheet application should do when a connection fails. The default value is ReConnectionMethodTyp |
| ReconnectionMethod | Number | Specifies what the spreadsheet application should do when a connection fails. The default value is ReConnectionMethodTyp |
| OnlyUseConnectionFile | boolean | Indicates whether the spreadsheet application should always and only use the connection information in the external conn |
| OdcFile | String | Specifies the full path to external connection file from which this connection was created. If a connection fails during |
| SourceFile | String | Used when the external data source is file-based. When a connection to such a data source fails, the spreadsheet applica |
| ConnectionFile | String | |
| IsNew | boolean | True if the connection has not been refreshed for the first time; otherwise, false. This state can happen when the user |
| Name | String | Specifies the name of the connection. Each connection must have a unique name. |
| KeepAlive | boolean | True when the spreadsheet application should make efforts to keep the connection open. When false, the application shoul |
| RefreshInternal | Number | Specifies the number of minutes between automatic refreshes of the connection. |
| ConnectionDescription | String | Specifies the user description for this connection |
| IsDeleted | boolean | Indicates whether the associated workbook connection has been deleted. true if the connection has been deleted; otherwis |
| CredentialsMethodType | Number | Specifies the authentication method to be used when establishing (or re-establishing) the connection. The value of the p |
| Credentials | Number | Specifies the authentication method to be used when establishing (or re-establishing) the connection. The value of the p |
| BackgroundRefresh | boolean | Indicates whether the connection can be refreshed in the background (asynchronously). true if preferred usage of the con |
| Parameters | ConnectionParameterCollection | Gets ConnectionParameterCollection for an ODBC or web query. |
DBConnection.ClassType property
The value of the property is ExternalConnectionClassType integer constant.
Type: Number
DBConnection.ConnectionString property
Type: String
DBConnection.ConnectionInfo property
The connection information string is used to make contact with an OLE DB or ODBC data source.
Type: String
DBConnection.PowerQueryFormula property
Gets the definition of power query formula.
Type: PowerQueryFormula
DBConnection.CommandType property
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. The value of the property is OLEDBCommandType integer constant.
Type: Number
DBConnection.Command property
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
Type: String
DBConnection.SeverCommand property
Specifies a second command text string that is persisted when PivotTable server-based page fields are in use. For ODBC connections, serverCommand is usually a broader query than command (no WHERE clause is present in the former). Based on these 2 commands(Command and ServerCommand), parameter UI can be populated and parameterized queries can be constructed
Type: String
DBConnection.SecondCommand property
Type: String
DBConnection.Id property
Gets the id of the connection.
Type: Number
DBConnection.ConnectionId property
Specifies The unique identifier of this connection.
Type: Number
DBConnection.Type property
Gets or Sets the external connection DataSource type.
Type: ConnectionDataSourceType
DBConnection.SourceType property
Type: ConnectionDataSourceType
DBConnection.SSOId property
Identifier for Single Sign On (SSO) used for authentication between an intermediate spreadsheetML server and the external data source.
Type: String
DBConnection.SavePassword property
True if the password is to be saved as part of the connection string; otherwise, False.
Type: boolean
DBConnection.SaveData property
True if the external data fetched over the connection to populate a table is to be saved with the workbook; otherwise, false.
Type: boolean
DBConnection.RefreshOnLoad property
True if this connection should be refreshed when opening the file; otherwise, false.
Type: boolean
DBConnection.ReconnectionMethodType property
Specifies what the spreadsheet application should do when a connection fails. The default value is ReConnectionMethodType.Required. The value of the property is ReConnectionMethodType integer constant.
Type: Number
DBConnection.ReconnectionMethod property
Specifies what the spreadsheet application should do when a connection fails. The default value is ReConnectionMethodType.Required. The value of the property is ReConnectionMethodType integer constant. NOTE: This property is now obsolete. Instead, please use ExternalConnection.ReconnectionMethodType property. This property will be removed 12 months later since October 2017. Aspose apologizes for any inconvenience you may have experienced.
Type: Number
DBConnection.OnlyUseConnectionFile property
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
Type: boolean
DBConnection.OdcFile property
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.
Type: String
DBConnection.SourceFile property
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.
Type: String
DBConnection.ConnectionFile property
Type: String
DBConnection.IsNew property
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.
Type: boolean
DBConnection.Name property
Specifies the name of the connection. Each connection must have a unique name.
Type: String
DBConnection.KeepAlive property
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.
Type: boolean
DBConnection.RefreshInternal property
Specifies the number of minutes between automatic refreshes of the connection.
Type: Number
DBConnection.ConnectionDescription property
Specifies the user description for this connection
Type: String
DBConnection.IsDeleted property
Indicates whether the associated workbook connection has been deleted. true if the connection has been deleted; otherwise, false.
Type: boolean
DBConnection.CredentialsMethodType property
Specifies the authentication method to be used when establishing (or re-establishing) the connection. The value of the property is CredentialsMethodType integer constant.
Type: Number
DBConnection.Credentials property
Specifies the authentication method to be used when establishing (or re-establishing) the connection. The value of the property is CredentialsMethodType integer constant. NOTE: This property is now obsolete. Instead, please use ExternalConnection.CredentialsMethodType property. This property will be removed 12 months later since October 2017. Aspose apologizes for any inconvenience you may have experienced.
Type: Number
DBConnection.BackgroundRefresh property
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.
Type: boolean
DBConnection.Parameters property
Gets ConnectionParameterCollection for an ODBC or web query.
Type: ConnectionParameterCollection