DBConnection
DBConnection class
Specifies all properties associated with an ODBC or OLE DB external data connection.
class DBConnection extends ExternalConnection;
Constructors
Constructor | Description |
---|---|
constructor(ExternalConnection) | Constructs from a parent object convertible to this. |
Properties
Property | Type | Description |
---|---|---|
connectionInfo | string | The connection information string is used to make contact with an OLE DB or ODBC data source. |
severCommand | string | 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 |
id | number | Readonly. Gets the id of the connection. |
connectionId | number | Readonly. Specifies The unique identifier of this connection. |
sourceType | ConnectionDataSourceType | Gets or Sets the external connection DataSource type. |
sSOId | string | Identifier for Single Sign On (SSO) used for authentication between an intermediate spreadsheetML server and the external data source. |
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, false. |
refreshOnLoad | boolean | True if this connection should be refreshed when opening the file; otherwise, false. |
reconnectionMethodType | ReConnectionMethodType | Specifies what the spreadsheet application should do when a connection fails. The default value is ReConnectionMethodType.Required. |
onlyUseConnectionFile | boolean | 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 |
odcFile | string | 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. |
sourceFile | string | 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. |
isNew | boolean | 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. |
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 should close the connection after retrieving the information. |
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; otherwise, false. |
credentialsMethodType | CredentialsMethodType | Specifies the authentication method to be used when establishing (or re-establishing) the connection. |
backgroundRefresh | boolean | 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. |
parameters | ConnectionParameterCollection | Readonly. Gets ConnectionParameterCollection for an ODBC or web query. |
Methods
Method | Description |
---|---|
getConnectionInfo() | @deprecated. Please use the ‘connectionInfo’ property instead. The connection information string is used to make contact with an OLE DB or ODBC data source. |
setConnectionInfo(string) | @deprecated. Please use the ‘connectionInfo’ property instead. The connection information string is used to make contact with an OLE DB or ODBC data source. |
getSeverCommand() | @deprecated. Please use the ‘severCommand’ property instead. 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 |
setSeverCommand(string) | @deprecated. Please use the ‘severCommand’ property instead. 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 |
isNull() | Checks whether the implementation object is null. |
getId() | @deprecated. Please use the ‘id’ property instead. Gets the id of the connection. |
getConnectionId() | @deprecated. Please use the ‘connectionId’ property instead. Specifies The unique identifier of this connection. |
getSourceType() | @deprecated. Please use the ‘sourceType’ property instead. Gets or Sets the external connection DataSource type. |
setSourceType(ConnectionDataSourceType) | @deprecated. Please use the ‘sourceType’ property instead. Gets or Sets the external connection DataSource type. |
getSSOId() | @deprecated. Please use the ‘sSOId’ property instead. Identifier for Single Sign On (SSO) used for authentication between an intermediate spreadsheetML server and the external data source. |
setSSOId(string) | @deprecated. Please use the ‘sSOId’ property instead. Identifier for Single Sign On (SSO) used for authentication between an intermediate spreadsheetML server and the external data source. |
getSavePassword() | @deprecated. Please use the ‘savePassword’ property instead. True if the password is to be saved as part of the connection string; otherwise, False. |
setSavePassword(boolean) | @deprecated. Please use the ‘savePassword’ property instead. True if the password is to be saved as part of the connection string; otherwise, False. |
getSaveData() | @deprecated. Please use the ‘saveData’ property instead. True if the external data fetched over the connection to populate a table is to be saved with the workbook; otherwise, false. |
setSaveData(boolean) | @deprecated. Please use the ‘saveData’ property instead. True if the external data fetched over the connection to populate a table is to be saved with the workbook; otherwise, false. |
getRefreshOnLoad() | @deprecated. Please use the ‘refreshOnLoad’ property instead. True if this connection should be refreshed when opening the file; otherwise, false. |
setRefreshOnLoad(boolean) | @deprecated. Please use the ‘refreshOnLoad’ property instead. True if this connection should be refreshed when opening the file; otherwise, false. |
getReconnectionMethodType() | @deprecated. Please use the ‘reconnectionMethodType’ property instead. Specifies what the spreadsheet application should do when a connection fails. The default value is ReConnectionMethodType.Required. |
setReconnectionMethodType(ReConnectionMethodType) | @deprecated. Please use the ‘reconnectionMethodType’ property instead. Specifies what the spreadsheet application should do when a connection fails. The default value is ReConnectionMethodType.Required. |
getOnlyUseConnectionFile() | @deprecated. Please use the ‘onlyUseConnectionFile’ property instead. 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 |
setOnlyUseConnectionFile(boolean) | @deprecated. Please use the ‘onlyUseConnectionFile’ property instead. 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 |
getOdcFile() | @deprecated. Please use the ‘odcFile’ property instead. 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. |
setOdcFile(string) | @deprecated. Please use the ‘odcFile’ property instead. 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. |
getSourceFile() | @deprecated. Please use the ‘sourceFile’ property instead. 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. |
setSourceFile(string) | @deprecated. Please use the ‘sourceFile’ property instead. 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. |
isNew() | @deprecated. Please use the ‘isNew’ property instead. 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. |
setIsNew(boolean) | @deprecated. Please use the ‘isNew’ property instead. 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. |
getName() | @deprecated. Please use the ’name’ property instead. Specifies the name of the connection. Each connection must have a unique name. |
setName(string) | @deprecated. Please use the ’name’ property instead. Specifies the name of the connection. Each connection must have a unique name. |
getKeepAlive() | @deprecated. Please use the ‘keepAlive’ property instead. 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. |
setKeepAlive(boolean) | @deprecated. Please use the ‘keepAlive’ property instead. 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. |
getRefreshInternal() | @deprecated. Please use the ‘refreshInternal’ property instead. Specifies the number of minutes between automatic refreshes of the connection. |
setRefreshInternal(number) | @deprecated. Please use the ‘refreshInternal’ property instead. Specifies the number of minutes between automatic refreshes of the connection. |
getConnectionDescription() | @deprecated. Please use the ‘connectionDescription’ property instead. Specifies the user description for this connection |
setConnectionDescription(string) | @deprecated. Please use the ‘connectionDescription’ property instead. Specifies the user description for this connection |
isDeleted() | @deprecated. Please use the ‘isDeleted’ property instead. Indicates whether the associated workbook connection has been deleted. true if the connection has been deleted; otherwise, false. |
setIsDeleted(boolean) | @deprecated. Please use the ‘isDeleted’ property instead. Indicates whether the associated workbook connection has been deleted. true if the connection has been deleted; otherwise, false. |
getCredentialsMethodType() | @deprecated. Please use the ‘credentialsMethodType’ property instead. Specifies the authentication method to be used when establishing (or re-establishing) the connection. |
setCredentialsMethodType(CredentialsMethodType) | @deprecated. Please use the ‘credentialsMethodType’ property instead. Specifies the authentication method to be used when establishing (or re-establishing) the connection. |
getBackgroundRefresh() | @deprecated. Please use the ‘backgroundRefresh’ property instead. 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. |
setBackgroundRefresh(boolean) | @deprecated. Please use the ‘backgroundRefresh’ property instead. 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. |
getParameters() | @deprecated. Please use the ‘parameters’ property instead. Gets ConnectionParameterCollection for an ODBC or web query. |
getClassType() | Gets the type of this ExternalConnection object. |
getConnectionString() | The connection information string is used to make contact with an OLE DB or ODBC data source. |
setConnectionString(string) | The connection information string is used to make contact with an OLE DB or ODBC data source. |
getPowerQueryFormula() | Gets the definition of power query formula. |
getCommandType() | 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. |
setCommandType(OLEDBCommandType) | 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. |
getCommand() | 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 |
setCommand(string) | 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 |
getSecondCommand() | 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 |
setSecondCommand(string) | 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 |
getConnectionFile() | Gets the connection file. |
constructor(ExternalConnection)
Constructs from a parent object convertible to this.
constructor(obj: ExternalConnection);
Parameters:
Parameter | Type | Description |
---|---|---|
obj | ExternalConnection | The parent object. |
connectionInfo
The connection information string is used to make contact with an OLE DB or ODBC data source.
connectionInfo : string;
Remarks
NOTE: This property is now obsolete. Instead, please use ExternalConnection.ConnectionString property. This method will be removed 12 months later since October 2024. Aspose apologizes for any inconvenience you may have experienced.
severCommand
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
severCommand : string;
Remarks
NOTE: This property is now obsolete. Instead, please use ExternalConnection.SecondCommand property. This method will be removed 12 months later since October 2024. Aspose apologizes for any inconvenience you may have experienced.
id
Readonly. Gets the id of the connection.
id : number;
connectionId
Readonly. Specifies The unique identifier of this connection.
connectionId : number;
Remarks
NOTE: This property is now obsolete. Instead, please use ExternalConnection.Id property. This property will be removed 12 months later since October 2024. Aspose apologizes for any inconvenience you may have experienced.
sourceType
Gets or Sets the external connection DataSource type.
sourceType : ConnectionDataSourceType;
sSOId
Identifier for Single Sign On (SSO) used for authentication between an intermediate spreadsheetML server and the external data source.
sSOId : string;
savePassword
True if the password is to be saved as part of the connection string; otherwise, False.
savePassword : boolean;
saveData
True if the external data fetched over the connection to populate a table is to be saved with the workbook; otherwise, false.
saveData : boolean;
refreshOnLoad
True if this connection should be refreshed when opening the file; otherwise, false.
refreshOnLoad : boolean;
reconnectionMethodType
Specifies what the spreadsheet application should do when a connection fails. The default value is ReConnectionMethodType.Required.
reconnectionMethodType : ReConnectionMethodType;
onlyUseConnectionFile
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
onlyUseConnectionFile : boolean;
odcFile
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.
odcFile : string;
sourceFile
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.
sourceFile : string;
isNew
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.
isNew : boolean;
name
Specifies the name of the connection. Each connection must have a unique name.
name : string;
keepAlive
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.
keepAlive : boolean;
refreshInternal
Specifies the number of minutes between automatic refreshes of the connection.
refreshInternal : number;
connectionDescription
Specifies the user description for this connection
connectionDescription : string;
isDeleted
Indicates whether the associated workbook connection has been deleted. true if the connection has been deleted; otherwise, false.
isDeleted : boolean;
credentialsMethodType
Specifies the authentication method to be used when establishing (or re-establishing) the connection.
credentialsMethodType : CredentialsMethodType;
backgroundRefresh
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.
backgroundRefresh : boolean;
parameters
Readonly. Gets ConnectionParameterCollection for an ODBC or web query.
parameters : ConnectionParameterCollection;
getConnectionInfo()
@deprecated. Please use the ‘connectionInfo’ property instead. The connection information string is used to make contact with an OLE DB or ODBC data source.
getConnectionInfo() : string;
Remarks
NOTE: This property is now obsolete. Instead, please use ExternalConnection.ConnectionString property. This method will be removed 12 months later since October 2024. Aspose apologizes for any inconvenience you may have experienced.
setConnectionInfo(string)
@deprecated. Please use the ‘connectionInfo’ property instead. The connection information string is used to make contact with an OLE DB or ODBC data source.
setConnectionInfo(value: string) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | string | The value to set. |
Remarks
NOTE: This property is now obsolete. Instead, please use ExternalConnection.ConnectionString property. This method will be removed 12 months later since October 2024. Aspose apologizes for any inconvenience you may have experienced.
getSeverCommand()
@deprecated. Please use the ‘severCommand’ property instead. 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
getSeverCommand() : string;
Remarks
NOTE: This property is now obsolete. Instead, please use ExternalConnection.SecondCommand property. This method will be removed 12 months later since October 2024. Aspose apologizes for any inconvenience you may have experienced.
setSeverCommand(string)
@deprecated. Please use the ‘severCommand’ property instead. 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
setSeverCommand(value: string) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | string | The value to set. |
Remarks
NOTE: This property is now obsolete. Instead, please use ExternalConnection.SecondCommand property. This method will be removed 12 months later since October 2024. Aspose apologizes for any inconvenience you may have experienced.
isNull()
Checks whether the implementation object is null.
isNull() : boolean;
getId()
@deprecated. Please use the ‘id’ property instead. Gets the id of the connection.
getId() : number;
getConnectionId()
@deprecated. Please use the ‘connectionId’ property instead. Specifies The unique identifier of this connection.
getConnectionId() : number;
Remarks
NOTE: This property is now obsolete. Instead, please use ExternalConnection.Id property. This property will be removed 12 months later since October 2024. Aspose apologizes for any inconvenience you may have experienced.
getSourceType()
@deprecated. Please use the ‘sourceType’ property instead. Gets or Sets the external connection DataSource type.
getSourceType() : ConnectionDataSourceType;
Returns
setSourceType(ConnectionDataSourceType)
@deprecated. Please use the ‘sourceType’ property instead. Gets or Sets the external connection DataSource type.
setSourceType(value: ConnectionDataSourceType) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | ConnectionDataSourceType | The value to set. |
getSSOId()
@deprecated. Please use the ‘sSOId’ property instead. Identifier for Single Sign On (SSO) used for authentication between an intermediate spreadsheetML server and the external data source.
getSSOId() : string;
setSSOId(string)
@deprecated. Please use the ‘sSOId’ property instead. Identifier for Single Sign On (SSO) used for authentication between an intermediate spreadsheetML server and the external data source.
setSSOId(value: string) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | string | The value to set. |
getSavePassword()
@deprecated. Please use the ‘savePassword’ property instead. True if the password is to be saved as part of the connection string; otherwise, False.
getSavePassword() : boolean;
setSavePassword(boolean)
@deprecated. Please use the ‘savePassword’ property instead. True if the password is to be saved as part of the connection string; otherwise, False.
setSavePassword(value: boolean) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | The value to set. |
getSaveData()
@deprecated. Please use the ‘saveData’ property instead. True if the external data fetched over the connection to populate a table is to be saved with the workbook; otherwise, false.
getSaveData() : boolean;
setSaveData(boolean)
@deprecated. Please use the ‘saveData’ property instead. True if the external data fetched over the connection to populate a table is to be saved with the workbook; otherwise, false.
setSaveData(value: boolean) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | The value to set. |
getRefreshOnLoad()
@deprecated. Please use the ‘refreshOnLoad’ property instead. True if this connection should be refreshed when opening the file; otherwise, false.
getRefreshOnLoad() : boolean;
setRefreshOnLoad(boolean)
@deprecated. Please use the ‘refreshOnLoad’ property instead. True if this connection should be refreshed when opening the file; otherwise, false.
setRefreshOnLoad(value: boolean) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | The value to set. |
getReconnectionMethodType()
@deprecated. Please use the ‘reconnectionMethodType’ property instead. Specifies what the spreadsheet application should do when a connection fails. The default value is ReConnectionMethodType.Required.
getReconnectionMethodType() : ReConnectionMethodType;
Returns
setReconnectionMethodType(ReConnectionMethodType)
@deprecated. Please use the ‘reconnectionMethodType’ property instead. Specifies what the spreadsheet application should do when a connection fails. The default value is ReConnectionMethodType.Required.
setReconnectionMethodType(value: ReConnectionMethodType) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | ReConnectionMethodType | The value to set. |
getOnlyUseConnectionFile()
@deprecated. Please use the ‘onlyUseConnectionFile’ property instead. 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
getOnlyUseConnectionFile() : boolean;
setOnlyUseConnectionFile(boolean)
@deprecated. Please use the ‘onlyUseConnectionFile’ property instead. 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
setOnlyUseConnectionFile(value: boolean) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | The value to set. |
getOdcFile()
@deprecated. Please use the ‘odcFile’ property instead. 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.
getOdcFile() : string;
setOdcFile(string)
@deprecated. Please use the ‘odcFile’ property instead. 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.
setOdcFile(value: string) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | string | The value to set. |
getSourceFile()
@deprecated. Please use the ‘sourceFile’ property instead. 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.
getSourceFile() : string;
setSourceFile(string)
@deprecated. Please use the ‘sourceFile’ property instead. 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.
setSourceFile(value: string) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | string | The value to set. |
isNew()
@deprecated. Please use the ‘isNew’ property instead. 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.
isNew() : boolean;
setIsNew(boolean)
@deprecated. Please use the ‘isNew’ property instead. 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.
setIsNew(value: boolean) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | The value to set. |
getName()
@deprecated. Please use the ’name’ property instead. Specifies the name of the connection. Each connection must have a unique name.
getName() : string;
setName(string)
@deprecated. Please use the ’name’ property instead. Specifies the name of the connection. Each connection must have a unique name.
setName(value: string) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | string | The value to set. |
getKeepAlive()
@deprecated. Please use the ‘keepAlive’ property instead. 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.
getKeepAlive() : boolean;
setKeepAlive(boolean)
@deprecated. Please use the ‘keepAlive’ property instead. 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.
setKeepAlive(value: boolean) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | The value to set. |
getRefreshInternal()
@deprecated. Please use the ‘refreshInternal’ property instead. Specifies the number of minutes between automatic refreshes of the connection.
getRefreshInternal() : number;
setRefreshInternal(number)
@deprecated. Please use the ‘refreshInternal’ property instead. Specifies the number of minutes between automatic refreshes of the connection.
setRefreshInternal(value: number) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | number | The value to set. |
getConnectionDescription()
@deprecated. Please use the ‘connectionDescription’ property instead. Specifies the user description for this connection
getConnectionDescription() : string;
setConnectionDescription(string)
@deprecated. Please use the ‘connectionDescription’ property instead. Specifies the user description for this connection
setConnectionDescription(value: string) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | string | The value to set. |
isDeleted()
@deprecated. Please use the ‘isDeleted’ property instead. Indicates whether the associated workbook connection has been deleted. true if the connection has been deleted; otherwise, false.
isDeleted() : boolean;
setIsDeleted(boolean)
@deprecated. Please use the ‘isDeleted’ property instead. Indicates whether the associated workbook connection has been deleted. true if the connection has been deleted; otherwise, false.
setIsDeleted(value: boolean) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | The value to set. |
getCredentialsMethodType()
@deprecated. Please use the ‘credentialsMethodType’ property instead. Specifies the authentication method to be used when establishing (or re-establishing) the connection.
getCredentialsMethodType() : CredentialsMethodType;
Returns
setCredentialsMethodType(CredentialsMethodType)
@deprecated. Please use the ‘credentialsMethodType’ property instead. Specifies the authentication method to be used when establishing (or re-establishing) the connection.
setCredentialsMethodType(value: CredentialsMethodType) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | CredentialsMethodType | The value to set. |
getBackgroundRefresh()
@deprecated. Please use the ‘backgroundRefresh’ property instead. 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.
getBackgroundRefresh() : boolean;
setBackgroundRefresh(boolean)
@deprecated. Please use the ‘backgroundRefresh’ property instead. 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.
setBackgroundRefresh(value: boolean) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | The value to set. |
getParameters()
@deprecated. Please use the ‘parameters’ property instead. Gets ConnectionParameterCollection for an ODBC or web query.
getParameters() : ConnectionParameterCollection;
Returns
getClassType()
Gets the type of this ExternalConnection object.
getClassType() : ExternalConnectionClassType;
Returns
getConnectionString()
The connection information string is used to make contact with an OLE DB or ODBC data source.
getConnectionString() : string;
setConnectionString(string)
The connection information string is used to make contact with an OLE DB or ODBC data source.
setConnectionString(value: string) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | string | The value to set. |
getPowerQueryFormula()
Gets the definition of power query formula.
getPowerQueryFormula() : PowerQueryFormula;
Returns
getCommandType()
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.
getCommandType() : OLEDBCommandType;
Returns
setCommandType(OLEDBCommandType)
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.
setCommandType(value: OLEDBCommandType) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | OLEDBCommandType | The value to set. |
getCommand()
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
getCommand() : string;
setCommand(string)
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
setCommand(value: string) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | string | The value to set. |
getSecondCommand()
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
getSecondCommand() : string;
setSecondCommand(string)
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
setSecondCommand(value: string) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | string | The value to set. |
getConnectionFile()
Gets the connection file.
getConnectionFile() : string;