Have an amazing solution built in RAD Studio? Let us know. Looking for discounts? Visit our Special Offers page!
CodeDatabaseDelphiRAD Studio

Learn How Easy It Is To Map Dataset Columns With A Table Adapter In FireDAC For Delphi

The Commands sample shows you how to set up column mappings.

Location

You can find the MappingColumns sample project at:

  • Start | Programs | Embarcadero RAD Studio Sydney | Samples and then navigate to:
    • Object PascalDatabaseFireDACSamplesDApt LayerMappingColumns
  • Subversion Repository:
    • You can find Delphi code samples in GitHub Repositories. Search by name into the samples repositories according to your RAD Studio version.

How to Use the Sample

  1. Navigate to the location given above and open MappingColumns.dproj.
  2. Press F9 or choose Run > Run.
  3. Click on the Use Connection Definition combo box and select an option.

Files

File in DelphiContains
MappingColumns.dproj
MappingColumns.dpr
The project itself.
fMappingColumns.pas
fMappingColumns.fmx
The main form.

Implementation

To set up the columns mapping, the sample implements the following steps.

Create table adapter

Assign command

Set source result set name

Set the DatSTable name

Set the DatSTable name where the rows are fetched.

Set the UpdateTable name

Set the UpdateTable name

Setup column mappings

Fetch rows

Update changes to RDBMS

To append rows, implement the following code:

Then, the sample updates the changes to the RDBMS.

Please go to the link below if you want to check the original post of Embarcadero for this sample:

http://docwiki.embarcadero.com/CodeExamples/Sydney/en/FireDAC.MappingColumns_Sample

Head over and check out the full source code for the dataset mapping column example for FireDAC in Delphi Windows development.


Reduce development time and get to market faster with RAD Studio, Delphi, or C++Builder.
Design. Code. Compile. Deploy.
Start Free Trial   Upgrade Today

   Free Delphi Community Edition   Free C++Builder Community Edition

Related posts
DelphiShowcase

Powerful Real-Time Retail Dashboard App is Powered by Delphi

DelphiRAD StudioTech Partner

How To Make An Epic Dashboard Visualization For Windows, Mobile And The Web The Easy Way

DelphiInterview

Developer Stories: Themba Sivate Talks About The ST Auto Player Lite Software

DelphiInterview

Developer Stories: Jarrod Davis Speaks Of His GameVision Toolkit Application

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

IN THE ARTICLES