Viewing Sage 300 Data in RAD Studio Data Explorer

Ready to get started?

Download for a free trial:

Download Now

Learn more:

Sage 300 FireDAC Components

Rapidly create and deploy powerful Delphi & C++Builder Apps that integrate with Sage 300.



How to view Sage 300 data in RAD Studio Data Explorer using the CData FireDAC Components for Sage 300.

Embarcadero RAD Studio provides a development environment for Delphi and C++Builder applications. With the CData FireDAC Components for Sage 300, you gain access to live Sage 300 data within RAD Studio, abstracting the data into tables, views, and stored procedures that can be used to both retrieve Sage 300 data. This article will walk through connecting to Sage 300 using the Data Explorer.

Connecting to Sage 300 Data Using Data Explorer

You can create a simple application for displaying Sage 300 data by utilizing the CData FireDAC Components for Sage 300 and a new VCL Forms Application:

  1. Open the Data Explorer in RAD Studio and expand FireDAC.
  2. Right-click on CData Sage 300 Data Source and click Add New Connection.

  3. Name the connection.
  4. Fill in the necessary connection parameters and click OK.

    Sage 300 requires some initial setup in order to communicate over the Sage 300 Web API.

    • Set up the security groups for the Sage 300 user. Give the Sage 300 user access to the option under Security Groups (per each module required).
    • Edit both web.config files in the /Online/Web and /Online/WebApi folders; change the key AllowWebApiAccessForAdmin to true. Restart the webAPI app-pool for the settings to take.
    • Once the user access is configured, click https://server/Sage300WebApi/ to ensure access to the web API.

    Authenticate to Sage 300 using Basic authentication.

    Connect Using Basic Authentication

    You must provide values for the following properties to successfully authenticate to Sage 300. Note that the provider reuses the session opened by Sage 300 using cookies. This means that your credentials are used only on the first request to open the session. After that, cookies returned from Sage 300 are used for authentication.

    • Url: Set this to the url of the server hosting Sage 300. Construct a URL for the Sage 300 Web API as follows: {protocol}://{host-application-path}/v{version}/{tenant}/ For example, http://localhost/Sage300WebApi/v1.0/-/.
    • User: Set this to the username of your account.
    • Password: Set this to the password of your account.

  5. Back in the Data Explorer, expand the views for the connection.
  6. Create a new VCL Forms application and drag a view (for example: OEInvoices) onto the form.

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

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