Discover how a bimodal integration strategy can address the major data management challenges facing your organization today.
Get the Report →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:
- 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 SAS xpt.
- Back in the Data Explorer, expand the views for the connection.
Create a new VCL Forms application and drag a view (for example: SampleTable_1) onto the form.
- Select the SampleTable_1View 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 SampleTable_1 data.
Related Articles
Below you can find other articles for using the CData ODBC Driver with RAD Studio, Delphi, and C++ Builder.