Combined Data Abstract Sample
This sample shows the combined suite of the main Data Abstract features.
The sample consists of three parts, each of which is devoted to a particular set of features:
- Business Processors and Business Rules,
- Dynamic Select and Dynamic Where and
- Union Tables.
Also, you have an opportunity to use the Reduced Delta feature concerning any of listed things.
-
On the first tab you can test custom business rules, which were specified on the server side.
You should try to violate these rules and see how the deltas are processed.
All details concerning the processing of a particular delta can be found in the log on the server main form.
You can see the content of each delta sent to the server.
You can choose how to show this violation: "Show Reconcile", "Raise Exception", "Both" or "None".
-
On the second tab you can appraise how to decrease network traffic and server load, using the Dynamic Select feature
and retrieving only needed columns. Notice that when you use the Dynamic Select feature the
"Send Reduced Delta" option will be forced to ON. This page also illustrates the use of Dynamic Where to submit
secure where clauses to the server in order to filter records fetched by the client.
-
The third tab shows the Union tables feature, that uses Unions defined in the server's Schema to fetch
data from several tables in the back-end database that is seamlessly combined and available to the client as a unified data table.
Examine the code
-
In order to see how Business Rules are implemented, please review code on the server side.
See the TDASampleService.bpBPClientsBeforeProcessChange event handler.
Notice that if your change does not correspond to a certain rule we just raise an exception in this handler.
Review what parameters are passed to the handler.
-
Examine TClientForm.btLoadProductsClick and TClientForm.btApplyChangesProductsClick to see how
Dynamic Where and Dynamic Select features are used there.
-
Take a look at the TClientForm.btLoadAddressesClick and TClientForm.btApplyChangesAddressesClick methods
to see how the union tables data is loaded and updated.
Getting started
- Run the Sample Server.
- Run the Combined Sample.
-
On the first tab, try to load data and edit it so that it violates business rules and see how it will be processed.
See the log on the server main form where you can try different Failure Behavior modes of the RemoteDataAdapter.
-
On the second tab, load and edit data. Examine the server log to see the commands performed on the server to process this changes,
using Dynamic Where, Dynamic Select and Reduced Delta features.
-
Try to fill Addresses on the third tab that are represented as Union table, change some records,
apply changes to the server using the Update button.
Examine the Sql command used to load and update data (in the server log).