All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.aspose.cells.DBConnection.html Maven / Gradle / Ivy

There is a newer version: 23.1
Show newest version





DBConnection




com.aspose.cells
Class DBConnection

java.lang.Object
  extended by ExternalConnection
      extended by com.aspose.cells.DBConnection

public class DBConnection 
extends ExternalConnection

Specifies all properties associated with an ODBC or OLE DB external data connection.


Property Getters/Setters Summary
booleangetBackgroundRefresh()→ inherited from ExternalConnection
voidsetBackgroundRefresh(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.
java.lang.StringgetCommand()
voidsetCommand(java.lang.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
intgetCommandType()
voidsetCommandType(int)
           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.
java.lang.StringgetConnectionDescription()→ inherited from ExternalConnection
voidsetConnectionDescription(java.lang.String)
           Specifies the user description for this connection
intgetConnectionId()→ inherited from ExternalConnection
           Specifies The unique identifier of this connection.
java.lang.StringgetConnectionInfo()
voidsetConnectionInfo(java.lang.String)
           The connection information string is used to make contact with an OLE DB or ODBC data source.
intgetCredentials()→ inherited from ExternalConnection
voidsetCredentials(int)
           Specifies the authentication method to be used when establishing (or re-establishing) the connection. The value of the property is CredentialsMethodType integer constant.
intgetCredentialsMethodType()→ inherited from ExternalConnection
voidsetCredentialsMethodType(int)
           Specifies the authentication method to be used when establishing (or re-establishing) the connection. The value of the property is CredentialsMethodType integer constant.
intgetId()→ inherited from ExternalConnection
           Gets the id of the connection.
booleanisDeleted()→ inherited from ExternalConnection
voidsetDeleted(boolean)
           Indicates whether the associated workbook connection has been deleted. true if the connection has been deleted; otherwise, false.
booleanisNew()→ inherited from ExternalConnection
voidsetNew(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.
booleangetKeepAlive()→ inherited from ExternalConnection
voidsetKeepAlive(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.
java.lang.StringgetName()→ inherited from ExternalConnection
voidsetName(java.lang.String)
           Specifies the name of the connection. Each connection must have a unique name.
java.lang.StringgetOdcFile()→ inherited from ExternalConnection
voidsetOdcFile(java.lang.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.
booleangetOnlyUseConnectionFile()→ inherited from ExternalConnection
voidsetOnlyUseConnectionFile(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
ConnectionParameterCollectiongetParameters()→ inherited from ExternalConnection
           Gets ConnectionParameterCollection for an ODBC or web query.
Aspose.Cells.QueryTables.PowerQueryFormulagetPowerQueryFormula()
           Gets the definition of power query formula.
intgetReconnectionMethod()→ inherited from ExternalConnection
voidsetReconnectionMethod(int)
           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.
intgetReconnectionMethodType()→ inherited from ExternalConnection
voidsetReconnectionMethodType(int)
           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.
intgetRefreshInternal()→ inherited from ExternalConnection
voidsetRefreshInternal(int)
           Specifies the number of minutes between automatic refreshes of the connection.
booleangetRefreshOnLoad()→ inherited from ExternalConnection
voidsetRefreshOnLoad(boolean)
           True if this connection should be refreshed when opening the file; otherwise, false.
booleangetSaveData()→ inherited from ExternalConnection
voidsetSaveData(boolean)
           True if the external data fetched over the connection to populate a table is to be saved with the workbook; otherwise, false.
booleangetSavePassword()→ inherited from ExternalConnection
voidsetSavePassword(boolean)
           True if the password is to be saved as part of the connection string; otherwise, False.
java.lang.StringgetSeverCommand()
voidsetSeverCommand(java.lang.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
java.lang.StringgetSourceFile()→ inherited from ExternalConnection
voidsetSourceFile(java.lang.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.
java.lang.StringgetSSOId()→ inherited from ExternalConnection
voidsetSSOId(java.lang.String)
           Identifier for Single Sign On (SSO) used for authentication between an intermediate spreadsheetML server and the external data source.
intgetType()→ inherited from ExternalConnection
voidsetType(int)
           Gets or Sets the external connection DataSource type. The value of the property is ConnectionDataSourceType integer constant.
 

Property Getters/Setters Detail

getConnectionInfo/setConnectionInfo

public java.lang.String getConnectionInfo() / public void setConnectionInfo(java.lang.String value)
The connection information string is used to make contact with an OLE DB or ODBC data source.

setConnectionInfo

public void setConnectionInfo(java.lang.String value)
The connection information string is used to make contact with an OLE DB or ODBC data source.

getPowerQueryFormula

public Aspose.Cells.QueryTables.PowerQueryFormula getPowerQueryFormula()
Gets the definition of power query formula.

getCommandType/setCommandType

public int getCommandType() / public void setCommandType(int value)
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.

setCommandType

public void setCommandType(int value)
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.

getCommand/setCommand

public java.lang.String getCommand() / public void setCommand(java.lang.String 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

public void setCommand(java.lang.String 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

getSeverCommand/setSeverCommand

public java.lang.String getSeverCommand() / public void setSeverCommand(java.lang.String 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

setSeverCommand

public void setSeverCommand(java.lang.String 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

getId

→ inherited from ExternalConnection
public int getId()
Gets the id of the connection.

getType/setType

→ inherited from ExternalConnection
public int getType() / public void setType(int value)
Gets or Sets the external connection DataSource type. The value of the property is ConnectionDataSourceType integer constant.

setType

→ inherited from ExternalConnection
public void setType(int value)
Gets or Sets the external connection DataSource type. The value of the property is ConnectionDataSourceType integer constant.

getSourceFile/setSourceFile

→ inherited from ExternalConnection
public java.lang.String getSourceFile() / public void setSourceFile(java.lang.String 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

→ inherited from ExternalConnection
public void setSourceFile(java.lang.String 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.

getSSOId/setSSOId

→ inherited from ExternalConnection
public java.lang.String getSSOId() / public void setSSOId(java.lang.String value)
Identifier for Single Sign On (SSO) used for authentication between an intermediate spreadsheetML server and the external data source.

setSSOId

→ inherited from ExternalConnection
public void setSSOId(java.lang.String value)
Identifier for Single Sign On (SSO) used for authentication between an intermediate spreadsheetML server and the external data source.

getSavePassword/setSavePassword

→ inherited from ExternalConnection
public boolean getSavePassword() / public void setSavePassword(boolean value)
True if the password is to be saved as part of the connection string; otherwise, False.

setSavePassword

→ inherited from ExternalConnection
public void setSavePassword(boolean value)
True if the password is to be saved as part of the connection string; otherwise, False.

getSaveData/setSaveData

→ inherited from ExternalConnection
public boolean getSaveData() / public void setSaveData(boolean value)
True if the external data fetched over the connection to populate a table is to be saved with the workbook; otherwise, false.

setSaveData

→ inherited from ExternalConnection
public void setSaveData(boolean value)
True if the external data fetched over the connection to populate a table is to be saved with the workbook; otherwise, false.

getRefreshOnLoad/setRefreshOnLoad

→ inherited from ExternalConnection
public boolean getRefreshOnLoad() / public void setRefreshOnLoad(boolean value)
True if this connection should be refreshed when opening the file; otherwise, false.

setRefreshOnLoad

→ inherited from ExternalConnection
public void setRefreshOnLoad(boolean value)
True if this connection should be refreshed when opening the file; otherwise, false.

getReconnectionMethodType/setReconnectionMethodType

→ inherited from ExternalConnection
public int getReconnectionMethodType() / public void setReconnectionMethodType(int value)
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.

setReconnectionMethodType

→ inherited from ExternalConnection
public void setReconnectionMethodType(int value)
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.

getReconnectionMethod/setReconnectionMethod

→ inherited from ExternalConnection
public int getReconnectionMethod() / public void setReconnectionMethod(int value)
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.

setReconnectionMethod

→ inherited from ExternalConnection
public void setReconnectionMethod(int value)
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.

getOnlyUseConnectionFile/setOnlyUseConnectionFile

→ inherited from ExternalConnection
public boolean getOnlyUseConnectionFile() / public void setOnlyUseConnectionFile(boolean 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

setOnlyUseConnectionFile

→ inherited from ExternalConnection
public void setOnlyUseConnectionFile(boolean 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

getOdcFile/setOdcFile

→ inherited from ExternalConnection
public java.lang.String getOdcFile() / public void setOdcFile(java.lang.String 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

→ inherited from ExternalConnection
public void setOdcFile(java.lang.String 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.

isNew/setNew

→ inherited from ExternalConnection
public boolean isNew() / public void setNew(boolean 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.

setNew

→ inherited from ExternalConnection
public void setNew(boolean 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.

getName/setName

→ inherited from ExternalConnection
public java.lang.String getName() / public void setName(java.lang.String value)
Specifies the name of the connection. Each connection must have a unique name.

setName

→ inherited from ExternalConnection
public void setName(java.lang.String value)
Specifies the name of the connection. Each connection must have a unique name.

getKeepAlive/setKeepAlive

→ inherited from ExternalConnection
public boolean getKeepAlive() / public void setKeepAlive(boolean 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.

setKeepAlive

→ inherited from ExternalConnection
public void setKeepAlive(boolean 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.

getRefreshInternal/setRefreshInternal

→ inherited from ExternalConnection
public int getRefreshInternal() / public void setRefreshInternal(int value)
Specifies the number of minutes between automatic refreshes of the connection.

setRefreshInternal

→ inherited from ExternalConnection
public void setRefreshInternal(int value)
Specifies the number of minutes between automatic refreshes of the connection.

getConnectionId

→ inherited from ExternalConnection
public int getConnectionId()
Specifies The unique identifier of this connection.

getConnectionDescription/setConnectionDescription

→ inherited from ExternalConnection
public java.lang.String getConnectionDescription() / public void setConnectionDescription(java.lang.String value)
Specifies the user description for this connection

setConnectionDescription

→ inherited from ExternalConnection
public void setConnectionDescription(java.lang.String value)
Specifies the user description for this connection

isDeleted/setDeleted

→ inherited from ExternalConnection
public boolean isDeleted() / public void setDeleted(boolean value)
Indicates whether the associated workbook connection has been deleted. true if the connection has been deleted; otherwise, false.

setDeleted

→ inherited from ExternalConnection
public void setDeleted(boolean value)
Indicates whether the associated workbook connection has been deleted. true if the connection has been deleted; otherwise, false.

getCredentialsMethodType/setCredentialsMethodType

→ inherited from ExternalConnection
public int getCredentialsMethodType() / public void setCredentialsMethodType(int value)
Specifies the authentication method to be used when establishing (or re-establishing) the connection. The value of the property is CredentialsMethodType integer constant.

setCredentialsMethodType

→ inherited from ExternalConnection
public void setCredentialsMethodType(int value)
Specifies the authentication method to be used when establishing (or re-establishing) the connection. The value of the property is CredentialsMethodType integer constant.

getCredentials/setCredentials

→ inherited from ExternalConnection
public int getCredentials() / public void setCredentials(int value)
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.

setCredentials

→ inherited from ExternalConnection
public void setCredentials(int value)
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.

getBackgroundRefresh/setBackgroundRefresh

→ inherited from ExternalConnection
public boolean getBackgroundRefresh() / public void setBackgroundRefresh(boolean 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.

setBackgroundRefresh

→ inherited from ExternalConnection
public void setBackgroundRefresh(boolean 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.

getParameters

→ inherited from ExternalConnection
public ConnectionParameterCollection getParameters()
Gets ConnectionParameterCollection for an ODBC or web query.

See Also:
          Aspose.Cells Documentation - the home page for the Aspose.Cells Product Documentation.
          Aspose.Cells Support Forum - our preferred method of support.





© 2015 - 2024 Weber Informatics LLC | Privacy Policy