Viewing SAS xpt Data in RAD Studio Data Explorer



How to view SAS xpt data in RAD Studio Data Explorer using the CData ODBC Driver for SAS xpt.

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

Configure a Connection to SAS xpt

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.

Connecting to Local SASXpt Files

You can connect to local SASXpt file by setting the URI to a folder containing SASXpt files.

Connecting to S3 data source

You can connect to Amazon S3 source to read SASXpt files. Set the following properties to connect:

  • URI: Set this to the folder within your bucket that you would like to connect to.
  • AWSAccessKey: Set this to your AWS account access key.
  • AWSSecretKey: Set this to your AWS account secret key.
  • TemporaryLocalFolder: Set this to the path, or URI, to the folder that is used to temporarily download SASXpt file(s).

Connecting to Azure Data Lake Storage Gen2

You can connect to ADLS Gen2 to read SASXpt files. Set the following properties to connect:

  • URI: Set this to the name of the file system and the name of the folder which contacts your SASXpt files.
  • AzureAccount: Set this to the name of the Azure Data Lake storage account.
  • AzureAccessKey: Set this to our Azure DataLakeStore Gen 2 storage account access key.
  • TemporaryLocalFolder: Set this to the path, or URI, to the folder that is used to temporarily download SASXpt file(s).

Connecting to SAS xpt Data Using Data Explorer

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

  1. Open the Data Explorer in RAD Studio and expand FireDAC.
  2. Right-click the ODBC Data Source node in the Data Explorer.
  3. Click Add New Connection.
  4. Enter a name for the connection.
  5. In the FireDAC Connection Editor that appears, set the DataSource property to the name of the ODBC DSN for SAS xpt.
  6. Back in the Data Explorer, expand the views for the connection.
  7. Create a new VCL Forms application and drag a view (for example: SampleTable_1) onto the form.

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

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

Related Articles

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

Ready to get started?

Download a free trial of the SASxpt ODBC Driver to get started:

 Download Now

Learn more:

SAS XPORT files Icon SASxpt ODBC Driver

The SASxpt ODBC Driver is a powerful tool that allows you to connect with live data from SAS xpt (XPORT) file data, directly from any applications that support ODBC connectivity.

Access SAS xpt (XPORT) files like you would a database - read, write, and update through a standard ODBC Driver interface.