New versions of the Salesforce API provide new objects and fields. If you get "Column not found" or "Base table or view not found" errors (and you're sure you have not made a mistake in your SQL), your Salesforce ODBC driver is requesting an earlier version of the API than the one that includes the specified column (field) or table (object).
The Salesforce ODBC driver initially supported version 27 of the Salesforce API. At the time of writing, the driver supports version 34 of the API. This change was introduced in version 1.0.38 of Salesforce ODBC driver. To check the latest situation with regards to Salesforce API version support, check:
ftp://ftp.easysoft.com/pub/salesforce/CHANGES.txt
(To find out the version of your Salesforce ODBC driver on Windows, look for the driver in the Drivers tab in ODBC Data Source Administrator. To find out the version of your Salesforce ODBC driver on Linux or UNIX, look at the file installation_dir/easysoft/sf_install.info
. By default, installation_dir
is /usr/local
.)
If your Salesforce ODBC driver does support the required API version, you need to alter data sources configured using an earlier version of the driver, if applicable.
On Windows, edit the data source in ODBC Data Source Administrator. Change the Logon URI attribute value. (For new data sources, the Logon URI attribute value automatically requests the latest version of the API that the driver supports.)
On Linux and UNIX, edit the data source in odbc.ini
, which, by default is located on /etc
. Change the URI
attribute value.
Replace the version specified in the right side of the URI. For example:
https://login.salesforce.com/services/Soap/u/27
becomes:
https://login.salesforce.com/services/Soap/u/34
The following SQL queries illustrate the effect of this change:
-- This Salesforce ODBC Data source requests version 27 of the Salesforce API. -- The QuoteLineItem object's Product2Id field was introduced in version 30 of the API, and so the query fails. select Product2Id from QuoteLineItem; "[Easysoft ODBC]General error column 'PRODUCT2ID' not found in specified tables"
-- This Salesforce ODBC Data source requests version 34 of the Salesforce API. select Product2Id from QuoteLineItem; "Product2Id" "01ti0000006Y3RpAAK"