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

FireWind

Свой
Регистрация
2 Дек 2005
Сообщения
1,957
Реакции
1,199
Credits
4,009
FireDAC Tip: Learn How to Manage Centralized Cached Updates With This Schema Adapter Sample
February 4, 2021 by Konstantin Tomov

The FireDAC.SchemaAdapterMemTable Sample uses some methods and properties of Для просмотра ссылки Войди или Зарегистрируйся in order to implement some features related with the management of Для просмотра ссылки Войди или Зарегистрируйся.

Location​

You can find the SchemaAdapterMemTable sample project at:
  • Start | Programs | Embarcadero RAD Studio Sydney | Samplesand then navigate to:
    • Object PascalDatabaseFireDACSamplesComp LayerTFDSchemaAdapterMemTable
  • Subversion Repository:
    • You can find Delphi code samples in Для просмотра ссылки Войди или Зарегистрируйся. 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 SchemaAdapter.dproj.
  2. Press F9 or choose Run > Run.
  3. Click on the Use Connection Definitioncombo box and select an option.
    • Modify the tables and interact with the provided buttons.
1612439296266.png

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 Для просмотра ссылки Войди или Зарегистрируйся. When you select an item of the combo box, the Для просмотра ссылки Войди или Зарегистрируйся method is called to open all datasets associated with the schema adapter related to this connection. Then, you will see two Для просмотра ссылки Войди или Зарегистрируйся, one in each Для просмотра ссылки Войди или Зарегистрируйся. Both Для просмотра ссылки Войди или Зарегистрируйся are used to display and manipulate records from a dataset in a tabular grid. Once the Для просмотра ссылки Войди или Зарегистрируйся are filled, you can interact with the sample. Each of the following buttons implements an Для просмотра ссылки Войди или Зарегистрируйся event to do what is described below:
  • Change or edit any data record. Then an Для просмотра ссылки Войди или Зарегистрируйся event uses the Для просмотра ссылки Войди или Зарегистрируйся property to display the number of changes in the changes log.
  • Interact with the buttons that provide the sample:
    • The SavePoint button uses the Для просмотра ссылки Войди или Зарегистрируйся property to return the current position in the changes log.
    • The RevertPoint button makes the changes log returns to the state when the value of Для просмотра ссылки Войди или Зарегистрируйся was obtained.
    • The UndoLastChange button uses the Для просмотра ссылки Войди или Зарегистрируйся method to cancel the last record change in the schema adapter changes log and to remove the record from the changes log.
    • The CancelUpdates button uses the Для просмотра ссылки Войди или Зарегистрируйся method to cancel changes for all records in this schema adapter changes log and to remove them from the changes log.
    • The ApplyUpdatesbutton uses:
For more information, please refer to the link below:
Для просмотра ссылки Войди или Зарегистрируйся
Для просмотра ссылки Войди или Зарегистрируйся