Aspose::Cells::ExternalConnections::DataModelConnection class
Contents
[
Hide
]DataModelConnection class
Specifies a data model connection.
class DataModelConnection : public Aspose::Cells::ExternalConnections::ExternalConnection
Methods
Method | Description |
---|---|
DataModelConnection(DataModelConnection_Impl* impl) | Constructs from an implementation object. |
DataModelConnection(const DataModelConnection& src) | Copy constructor. |
DataModelConnection(const ExternalConnection& src) | Constructs from a parent object. |
ExternalConnection(ExternalConnection_Impl* impl) | Constructs from an implementation object. |
ExternalConnection(const ExternalConnection& src) | Copy constructor. |
GetBackgroundRefresh() | 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. |
virtual GetClassType() | Gets the type of this ExternalConnection object. |
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. |
GetCommandType() | Returns OLEDBCommandType type. |
GetConnectionDescription() | Specifies the user description for this connection. |
GetConnectionFile() | Gets the connection file. |
GetConnectionId() | (Deprecated) Specifies The unique identifier of this connection. |
GetConnectionString() | The connection information string is used to make contact with an OLE DB or ODBC data source. |
GetCredentialsMethodType() | Specifies the authentication method to be used when establishing (or re-establishing) the connection. |
GetId() | Gets the id of the connection. |
GetKeepAlive() | 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. |
GetName() | Specifies the name of the connection. Each connection must have a unique name. |
GetOdcFile() | 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. |
GetOnlyUseConnectionFile() | 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. |
GetParameters() | Gets ConnectionParameterCollection for an ODBC or web query. |
GetPowerQueryFormula() | Gets the definition of power query formula. |
GetReconnectionMethodType() | Specifies what the spreadsheet application should do when a connection fails. The default value is ReConnectionMethodType.Required. |
GetRefreshInternal() | Specifies the number of minutes between automatic refreshes of the connection. |
GetRefreshOnLoad() | True if this connection should be refreshed when opening the file; otherwise, false. |
GetSaveData() | True if the external data fetched over the connection to populate a table is to be saved with the workbook; otherwise, false. |
GetSavePassword() | True if the password is to be saved as part of the connection string; otherwise, False. |
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. |
GetSourceFile() | 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. |
GetSourceType() | Gets or Sets the external connection DataSource type. |
GetSSOId() | Identifier for Single Sign On (SSO) used for authentication between an intermediate spreadsheetML server and the external data source. |
IsDeleted() | Indicates whether the associated workbook connection has been deleted. true if the connection has been deleted; otherwise, false. |
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. |
IsNull() const | Checks whether the implementation object is nullptr. |
explicit operator bool() const | operator bool() |
operator=(const DataModelConnection& src) | operator= |
operator=(const ExternalConnection& src) | operator= |
SetBackgroundRefresh(bool value) | 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. |
SetCommand(const U16String& value) | 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(const char16_t* value) | 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. |
SetCommandType(OLEDBCommandType value) | Returns OLEDBCommandType type. |
SetConnectionDescription(const U16String& value) | Specifies the user description for this connection. |
SetConnectionDescription(const char16_t* value) | Specifies the user description for this connection. |
SetConnectionString(const U16String& value) | The connection information string is used to make contact with an OLE DB or ODBC data source. |
SetConnectionString(const char16_t* value) | The connection information string is used to make contact with an OLE DB or ODBC data source. |
SetCredentialsMethodType(CredentialsMethodType value) | Specifies the authentication method to be used when establishing (or re-establishing) the connection. |
SetIsDeleted(bool value) | Indicates whether the associated workbook connection has been deleted. true if the connection has been deleted; otherwise, false. |
SetIsNew(bool value) | 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. |
SetKeepAlive(bool value) | 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. |
SetName(const U16String& value) | Specifies the name of the connection. Each connection must have a unique name. |
SetName(const char16_t* value) | Specifies the name of the connection. Each connection must have a unique name. |
SetOdcFile(const U16String& value) | 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(const char16_t* value) | 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. |
SetOnlyUseConnectionFile(bool value) | 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. |
SetReconnectionMethodType(ReConnectionMethodType value) | Specifies what the spreadsheet application should do when a connection fails. The default value is ReConnectionMethodType.Required. |
SetRefreshInternal(int32_t value) | Specifies the number of minutes between automatic refreshes of the connection. |
SetRefreshOnLoad(bool value) | True if this connection should be refreshed when opening the file; otherwise, false. |
SetSaveData(bool value) | True if the external data fetched over the connection to populate a table is to be saved with the workbook; otherwise, false. |
SetSavePassword(bool value) | True if the password is to be saved as part of the connection string; otherwise, False. |
SetSecondCommand(const U16String& value) | 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(const char16_t* value) | 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. |
SetSourceFile(const U16String& value) | 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(const char16_t* value) | 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. |
SetSourceType(ConnectionDataSourceType value) | Gets or Sets the external connection DataSource type. |
SetSSOId(const U16String& value) | Identifier for Single Sign On (SSO) used for authentication between an intermediate spreadsheetML server and the external data source. |
SetSSOId(const char16_t* value) | Identifier for Single Sign On (SSO) used for authentication between an intermediate spreadsheetML server and the external data source. |
~DataModelConnection() | Destructor. |
~ExternalConnection() | Destructor. |
Fields
Field | Description |
---|---|
_impl | The implementation object. |
See Also
- Class ExternalConnection
- Namespace Aspose::Cells::ExternalConnections
- Library Aspose.Cells for C++