This sample shows how to redirect inserting, deleting and updating records using standalone table adapter.
Table of Contents
Location
You can find the Commands sample project at:
- Start | Programs | Embarcadero RAD Studio Sydney | Samples and then navigate to:
Object PascalDatabaseFireDACSamplesDApt LayerCommands
- Subversion Repository:
- You can find Delphi code samples in GitHub Repositories. Search by name into the samples repositories according to your RAD Studio version.
Files
File in Delphi | Contains |
---|---|
Commands.dproj Commands.dpr | The project itself. |
fCommands.pas fCommands.fmx | The main form. |
Implementation
The sample implements the following standalone table adapter features.
Create table adapter
[crayon-68ca06d59ecd5148307960/]Selecting data
[crayon-68ca06d59ecde592426467/]Redirect records
Redirect all record inserts into FDQA_map2 table instead FDQA_map1:
[crayon-68ca06d59ecdf671464757/]Redirect all record deletes into FDQA_map3 table instead FDQA_map1:
[crayon-68ca06d59ece1179781927/]Redirect all record updates into FDQA_map4 table instead FDQA_map1:
[crayon-68ca06d59ece2626034936/]Add new rows
[crayon-68ca06d59ece3161435536/]Post changes to RDBMS
[crayon-68ca06d59ece5180221810/]For more details and links to other posts, you can refer to the link below:
http://docwiki.embarcadero.com/CodeExamples/Sydney/en/FireDAC.DAptLayerCommands_Sample