Salesforce ODBC connection string parameters
The following table describes the key connection string parameters for connecting to Salesforce via the ODBC driver.
Authentication
Parameter |
Description |
Authentication |
Specifies the authentication method used to connect to Salesforce. If not specified, defaults to password-based authentication. |
OAuth |
Enables OAuth 2.0 authentication for connecting to Salesforce. |
Server configuration
Parameter |
Description |
Server |
Specifies the Salesforce server URL. Supported domains include salesforce.com , force.com , and database.com . The default value is login.salesforce.com .. |
User ID |
Specifies the Salesforce username, required for password-based authentication. |
Password |
Specifies the Salesforce password, required for password-based authentication. |
Security Token |
Specifies the security token, required for password-based authentication. |
Refresh Token |
Specifies the OAuth 2.0 refresh token, required for OAuth 2.0 authentication. |
Proxy settings
Parameter |
Description |
ProxyServer |
Hostname or IP address of the proxy server. |
ProxyPort |
Port number for the proxy server. |
ProxyUser |
Username required for proxy authentication. |
ProxyPassword |
Password required for proxy authentication. |
Advanced settings
Parameter |
Description |
AllowNullStringsInMetadata |
Allows metadata retrieval even when some parameters contain NULL values, ensuring compatibility with third-party tools that pass NULL. The default value is True . |
EmptyStringsAsNullInMetadata |
Converts empty strings to NULL when retrieving data. The default value is True . |
Cache Metadata |
Configures metadata caching. Available options:False – Caching is disabled.Hour – Cached metadata is reset every hour.Day – Cached metadata is reset daily (every 24 hours).Month – Cached metadata is reset monthly.True – Metadata caching is permanent until the driver is unloaded.
|
Connection Timeout |
Sets the timeout (in seconds) for establishing a connection. The default value is 60 (seconds). |
Include Deleted |
Specifies whether to include deleted records in query results. The default value is False . |
ODBC Behavior |
Defines ODBC behavior for compatibility with third-party tools. Available options:Default – Default ODBC behavior.Ver 2.x – Explicitly sets ODBC 2.x behavior.Ver 3.x – Explicitly sets ODBC 3.x behavior.
|
RegionalNumberSettings |
Enables local regional settings for converting numbers to strings. The default value is False . |
RegionalDateTimeSettings |
Enables local regional settings for converting dates and times to strings. The default value is False . |
ReturnForeignKeys |
Specifies whether to include foreign keys in metadata queries, which may impact performance. The default value is False . |
String Types |
Defines the type of string data returned:Default – The driver defines the string types.Ansi – Returns string data as SQL_CHAR , SQL_VARCHAR , and SQL_LONGVARCHAR .Unicode – Returns string data as SQL_WCHAR , SQL_WVARCHAR , and SQL_WLONGVARCHAR .
|
Query Timeout |
Sets the timeout (in seconds) for query execution. The default value is 60 (seconds). |
UTC Dates |
Specifies whether datetime values should be returned as UTC or converted to local time. The default value is False . |
Sample connection string
The following sample Salesforce ODBC connection string uses password-based authentication.
DRIVER={Devart ODBC Driver for Salesforce};Server=login.salesforce.com;User ID=your_salesforce_username;Password=your_salesforce_password;Security Token=your_salesforce_security_token