ODBCConnection Properties

Name

Returns

Description

AlwaysUse ConnectionFile

Boolean

Set/Get whether an external connection file will be used to establish a connection to the data source. When this property is set to True, any embedded connection information will be ignored, and the external connection file will be used

Background Query

Boolean

Set/Get if the processing of queries is done asynchronously

CommandText

Variant

Set/Get a command string that passes commands to the data source. This property essentially replaces the SQL property, which still exists only for compatibility purposes

Table continued on following page

Name

Returns

Description

CommandType

xlCmdType

Set/Get one of the xlCmdType constants that define the type of command that is passed. The default is the xlCmd-SQL constant

Connection

String

Set/Get the connection string for to an ODBC data source

EnableRefresh

Boolean

Set/Get whether an external connection can be refreshed via the user interface. Default is True

RefreshDate

Date

Read-only. Returns date of last refresh

Refreshing

Boolean

Set/Get whether a background ODBC query is currently being run

RefreshOnFileOpen

Boolean

Set/Get whether a connection is automatically refreshed when the workbook is opened. Default is False

RefreshPeriod

Long

Set/Get the number of minutes between refreshes. This property can be set to any value between 0 and 32767. Setting this property to 0 will effectively disable automatic periodic refreshing

RobustConnect

xlRobust Connect

Set/Get the method by which the ODBCConnection object connects to your data source. The RobustConnect property allows an IT Department to maintain and update connections in a central place, permitting users to automatically fetch those updates in the event that the connection cached within their workbook fails

SavePassword

Boolean

Set/Get whether password information is saved in the connection string

ServerCredentials Method

Credentials Method

Set/Get the type of credentials to be used for server authentication. Your choices through the xlCredentialsMethod are integrated, none, prompted, and stored

ServerSSO ApplicationID

String

Set/Get a single sign-on application (SSO) identifier that is used to do a lookup in the SSO database for credentials

Source

Connection

File

String

Set/Get the name of the file that was used to create the connection

SourceData

Variant

Set/Get the data source for the connection

SourceData File

String

Set/Get the name of the source data file for the connection

+1 0

Responses

  • abdullah
    How to use odbcconnection.refreshdate vba?
    6 years ago

Post a comment