Ready to get started?

Learn more about the CData FireDAC Components for FTP or download a free trial:

Download Now

Viewing FTP Data in RAD Studio Data Explorer

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

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

Connecting to FTP Data Using Data Explorer

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

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

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

    To connect to FTP or SFTP servers, specify at least RemoteHost and FileProtocol. Specify the port with RemotePort.

    Set User and Password to perform Basic authentication. Set SSHAuthMode to use SSH authentication. See the Getting Started section of the data provider help documentation for more information on authenticating via SSH.

    Set SSLMode and SSLServerCert to secure connections with SSL.

    The data provider lists the tables based on the available folders in your FTP server. Set the following connection properties to control the relational view of the file system:

    • RemotePath: Set this to the current working directory.
    • TableDepth: Set this to control the depth of folders to list as views.
    • FileRetrievalDepth: Set this to retrieve and list files recursively from the root table.

    Stored Procedures are available to download files, upload files, and send protocol commands. See the Data Model chapter of the FTP data provider documentation for more information.

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

  7. Select the MyDirectoryTable 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 MyDirectory data.

 
 
ダウンロード