Viewing Salesforce Data in RAD Studio Data Explorer
Embarcadero RAD Studio provides a development environment for Delphi and C++Builder applications. With the CData ODBC Driver for Salesforce, you gain access to live Salesforce data within RAD Studio, abstracting the data into tables, views, and stored procedures that can be used to both retrieve and update Salesforce data. This article will walk through connecting to Salesforce using the Data Explorer.
About Salesforce Data Integration
Accessing and integrating live data from Salesforce has never been easier with CData. Customers rely on CData connectivity to:
- Access to custom entities and fields means Salesforce users get access to all of Salesforce.
- Create atomic and batch update operations.
- Read, write, update, and delete their Salesforce data.
- Leverage the latest Salesforce features and functionalities with support for SOAP API versions 30.0.
- See improved performance based on SOQL support to push complex queries down to Salesforce servers.
- Use SQL stored procedures to perform actions like creating, retrieving, aborting, and deleting jobs, uploading and downloading attachments and documents, and more.
Users frequently integrate Salesforce data with:
- other ERPs, marketing automation, HCMs, and more.
- preferred data tools like Power BI, Tableau, Looker, and more.
- databases and data warehouses.
For more information on how CData solutions work with Salesforce, check out our Salesforce integration page.
Getting Started
Configure a Connection to Salesforce
If you have not already, first specify connection properties in an ODBC DSN (data source name). This is the last step of the driver installation. You can use the Microsoft ODBC Data Source Administrator to create and configure ODBC DSNs.
There are several authentication methods available for connecting to Salesforce: OAuth, Login (or basic), and SSO. The Login method requires you to have the username, password, and security token of the user.
OAuth Authentication (default)
The default authentication mechanism (and the one preferred by Salesforce) is OAuth. To use OAuth with CData's embedded OAuth application, leave the connection properties blank. If you have configured your own custom OAuth application with Salesforce (see the Help documentation for more information), set OAuthClientId, OAuthClientSecret, and CallbackURL to the properties for you application. Set InitiateOAuth to the desired OAuth flow ("GETANDREFRESH" will have the connector manage the entire OAuth flow).
Login (or Basic) Authentication
If you do not wish do not wish to use OAuth authentication, you can use Login (or basic) authentication. Set AuthScheme to Basic, and set the User, Password, and SecurityToken properties. You can configure your security token in Salesforce.
SSO (single sign-on) Authentication
SSO (single sign-on) can be used by setting the SSOProperties, SSOLoginUrl, and SSOExchangeURL connection properties, which allow you to authenticate to an identity provider. See the "Getting Started" chapter in the Help documentation for more information.
Connecting to Salesforce Data Using Data Explorer
You can create a simple application for displaying Salesforce data by utilizing the CData FireDAC Components for Salesforce and a new VCL Forms Application:
- Open the Data Explorer in RAD Studio and expand FireDAC.
- Right-click the ODBC Data Source node in the Data Explorer.
- Click Add New Connection.

- Enter a name for the connection.
- In the FireDAC Connection Editor that appears, set the DataSource property to the name of the ODBC DSN for Salesforce.

- Back in the Data Explorer, expand the tables for the connection.
Create a new VCL Forms application and drag a table (for example: Account) onto the form.

- Select the AccountTable object on the form and set the Active property to true.
Right-click on the object, bind visually, and link everything (*) to a new control (TStringGrid).

Arrange the TStringGrid on the form and run the application to see the Account data.

Related Articles
Below you can find other articles for using the CData ODBC Driver with RAD Studio, Delphi, and C++ Builder.