Componentes.Terceros.RemObj.../internal/6.0.43.801/1/RemObjects Samples/Data Abstract for Delphi/Union Tables/UnionTables.Sample.html
2010-01-29 16:17:43 +00:00

52 lines
2.0 KiB
HTML

<html>
<head>
<link rel="stylesheet" type="text/css" href="..\styles.css">
</head>
<body>
<img src="..\..\da.png" alt="" align="right">
<!-------------------------------------------------------------------------->
<p class="h1">Union Tables Sample</p>
<p>
This sample uses <b>Unions</b> 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.
Note how the Union table contains an additional @SourceTable field to indicate the original table,
and how by filling the @SourceTable field with the appropriate value when inserting new records,
those records can automatically be updated into the appropriate back-end table.
</p>
<p class="h2">Examine the code</p>
<ul>
<li>
Take a look at the <b>TClientForm.btLoadClick</b> method to see how the data is loaded.
Note that the calculated field SourceTableName is not loaded from the server.
</li>
<li>See the <b>TClientForm.btUpdateClick</b> event handler, where the dataset is updated.</li>
<li>
Look at the piece of code in <b>TClientForm.btUpdateClick</b> method related to filter.
See how <b>Dynamic Where</b> conditions are applied to the <b>Union Tables</b>.
<b>Dynamic Where</b> conditions work fine against union tables.
</li>
<li>
Examine properties of the <b>RemoteDataAdapter</b>.
Note that its <b>DataStreamer.SendReducedDelta</b> and <b>DynamicSelect</b> properties are both set to true.
</li>
</ul>
<p class="h2">Getting started</p>
<ul>
<li>Run the Sample Server.</li>
<li>Run the Union Tables Sample.</li>
<li>Try to fill DataSet.</li>
<li>Try to change some records.</li>
<li>Apply changes to the server using the Update button.</li>
<li>Examine the Sql command used to load and update data (in the server log).</li>
<li>
Try to apply simple DynamicWhere condition like 'fr'. Examine the server log to see how the data is loaded from two
different physical tables using the provided condition.
</li>
</ul>
</body>
</html>