This sample shows how to redirect inserting, deleting and updating records using standalone table adapter.
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.dprojCommands.dpr | The project itself. |
fCommands.pasfCommands.fmx | The main form. |
Implementation
The sample implements the following standalone table adapter features.
Create table adapter
[crayon-6929340b1b58e365724084/]Selecting data
[crayon-6929340b1b593364020044/]Redirect records
Redirect all record inserts into FDQA_map2 table instead FDQA_map1:
[crayon-6929340b1b595718407780/]Redirect all record deletes into FDQA_map3 table instead FDQA_map1:
[crayon-6929340b1b596460223086/]Redirect all record updates into FDQA_map4 table instead FDQA_map1:
[crayon-6929340b1b598643453840/]Add new rows
[crayon-6929340b1b599049172476/]Post changes to RDBMS
[crayon-6929340b1b59a819880224/]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

