Site icon Embarcadero RAD Studio, Delphi, & C++Builder Blogs

FireDAC Tip: Learn How to Manage Centralized Cached Updates With This Schema Adapter Sample

The FireDAC.SchemaAdapterMemTable Sample uses some methods and properties of TFDSchemaAdapter in order to implement some features related with the management of Centralized Cached Updates.

Location

You can find the SchemaAdapterMemTable sample project at:

How to Use the Sample

  1. Navigate to the location given above and open SchemaAdapter.dproj.
  2. Press F9 or choose Run > Run.
  3. Click on the Use Connection Definition combo box and select an option.
    • Modify the tables and interact with the provided buttons.

Files

File in DelphiContains
SchemaAdapter.dproj
SchemaAdapter.dpr
The project itself.
fSchemaAdapter.pas
fSchemaAdapter.fmx
The main form.

Implementation

When you run the application, click on the Use Connection Definition combo box and select an option in order to define a connection. When you select an item of the combo box, the Open method is called to open all datasets associated with the schema adapter related to this connection. Then, you will see two tables, one in each TDBGrid. Both TDBGrids are used to display and manipulate records from a dataset in a tabular grid. Once the TDBGrids are filled, you can interact with the sample. Each of the following buttons implements an OnClick event to do what is described below:

For more information, please refer to the link below:

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

Check out the full source code for this FireDAC schema adapter for TFDMemTable sample on Embarcadero’s GitHub.

Exit mobile version