Class DataModelConnection

DataModelConnection class

Specifies a data model connection

public class DataModelConnection : ExternalConnection

Properties

NameDescription
BackgroundRefresh { get; set; }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.)
override ClassType { get; }Gets the type of this ExternalConnection object.
override Command { get; set; }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
override CommandType { get; set; }Returns OLEDBCommandType type.
ConnectionDescription { get; set; }Specifies the user description for this connection(Inherited from ExternalConnection.)
virtual ConnectionFile { get; }Gets the connection file.(Inherited from ExternalConnection.)
ConnectionId { get; }(Obsolete.) Specifies The unique identifier of this connection.(Inherited from ExternalConnection.)
override ConnectionString { get; set; }The connection information string is used to make contact with an OLE DB or ODBC data source.
Credentials { get; set; }(Obsolete.) Specifies the authentication method to be used when establishing (or re-establishing) the connection.(Inherited from ExternalConnection.)
CredentialsMethodType { get; set; }Specifies the authentication method to be used when establishing (or re-establishing) the connection.(Inherited from ExternalConnection.)
Id { get; }Gets the id of the connection.(Inherited from ExternalConnection.)
IsDeleted { get; set; }Indicates whether the associated workbook connection has been deleted. true if the connection has been deleted; otherwise, false.(Inherited from ExternalConnection.)
IsNew { get; set; }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.)
KeepAlive { get; set; }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.)
Name { get; set; }Specifies the name of the connection. Each connection must have a unique name.(Inherited from ExternalConnection.)
OdcFile { get; set; }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.)
OnlyUseConnectionFile { get; set; }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.)
Parameters { get; }Gets ConnectionParameterCollection for an ODBC or web query.(Inherited from ExternalConnection.)
virtual PowerQueryFormula { get; }Gets the definition of power query formula.(Inherited from ExternalConnection.)
ReconnectionMethod { get; set; }(Obsolete.) Specifies what the spreadsheet application should do when a connection fails. The default value is ReConnectionMethodType.Required.(Inherited from ExternalConnection.)
ReconnectionMethodType { get; set; }Specifies what the spreadsheet application should do when a connection fails. The default value is ReConnectionMethodType.Required.(Inherited from ExternalConnection.)
RefreshInternal { get; set; }Specifies the number of minutes between automatic refreshes of the connection.(Inherited from ExternalConnection.)
RefreshOnLoad { get; set; }True if this connection should be refreshed when opening the file; otherwise, false.(Inherited from ExternalConnection.)
SaveData { get; set; }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.)
SavePassword { get; set; }True if the password is to be saved as part of the connection string; otherwise, False.(Inherited from ExternalConnection.)
virtual SecondCommand { get; set; }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(Inherited from ExternalConnection.)
SourceFile { get; set; }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.)
SourceType { get; set; }Gets or Sets the external connection DataSource type.(Inherited from ExternalConnection.)
SSOId { get; set; }Identifier for Single Sign On (SSO) used for authentication between an intermediate spreadsheetML server and the external data source.(Inherited from ExternalConnection.)
Type { get; set; }(Obsolete.) Gets or Sets the external connection DataSource type.(Inherited from ExternalConnection.)

See Also