Discover how a bimodal integration strategy can address the major data management challenges facing your organization today.
Get the Report →Viewing Microsoft Dataverse Data in RAD Studio Data Explorer
How to view Microsoft Dataverse data in RAD Studio Data Explorer using the CData ODBC Driver for Microsoft Dataverse.
Embarcadero RAD Studio provides a development environment for Delphi and C++Builder applications. With the CData ODBC Driver for Microsoft Dataverse, you gain access to live Microsoft Dataverse data within RAD Studio, abstracting the data into tables, views, and stored procedures that can be used to both retrieve and update Microsoft Dataverse data. This article will walk through connecting to Microsoft Dataverse using the Data Explorer.
About Microsoft Dataverse Data Integration
CData provides the easiest way to access and integrate live data from Microsoft Dataverse (formerly the Common Data Service). Customers use CData connectivity to:
- Access both Dataverse Entities and Dataverse system tables to work with exactly the data they need.
- Authenticate securely with Microsoft Dataverse in a variety of ways, including Azure Active Directory, Azure Managed Service Identity credentials, and Azure Service Principal using either a client secret or a certificate.
- Use SQL stored procedures to manage Microsoft Dataverse entities - listing, creating, and removing associations between entities.
CData customers use our Dataverse connectivity solutions for a variety of reasons, whether they're looking to replicate their data into a data warehouse (alongside other data sources)or analyze live Dataverse data from their preferred data tools inside the Microsoft ecosystem (Power BI, Excel, etc.) or with external tools (Tableau, Looker, etc.).
Getting Started
Configure a Connection to Microsoft Dataverse
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.
You can connect without setting any connection properties for your user credentials. Below are the minimum connection properties required to connect.
- InitiateOAuth: Set this to GETANDREFRESH. You can use InitiateOAuth to avoid repeating the OAuth exchange and manually setting the OAuthAccessToken.
- OrganizationUrl: Set this to the organization URL you are connecting to, such as https://myorganization.crm.dynamics.com.
- Tenant (optional): Set this if you wish to authenticate to a different tenant than your default. This is required to work with an organization not on your default Tenant.
When you connect the Common Data Service OAuth endpoint opens in your default browser. Log in and grant permissions. The OAuth process completes automatically.
Connecting to Microsoft Dataverse Data Using Data Explorer
You can create a simple application for displaying Microsoft Dataverse data by utilizing the CData FireDAC Components for Microsoft Dataverse 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 Microsoft Dataverse.
- Back in the Data Explorer, expand the tables for the connection.
Create a new VCL Forms application and drag a table (for example: Accounts) onto the form.
- Select the AccountsTable 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 Accounts data.
Related Articles
Below you can find other articles for using the CData ODBC Driver with RAD Studio, Delphi, and C++ Builder.