61 lines
1.8 KiB
HTML
61 lines
1.8 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">
|
|
<span>Fetch</span>
|
|
</p>
|
|
|
|
|
|
<h2>Purpose</h2>
|
|
<p>
|
|
This demo shows how to fetch paged orders and also master/detail via single
|
|
server call. See the
|
|
<a href="http://www.remobjects.com?da04">DA04</a>
|
|
|
|
article for a discussion on Dynamic Method Binding using this
|
|
sample as its example.</p>
|
|
<h2>Getting Started</h2>
|
|
<p>
|
|
When you compile and run both projects you will see the client present you
|
|
with two tabbed pages:
|
|
</p>
|
|
|
|
<ul>
|
|
<li>
|
|
<b>Paged Orders</b>: when the master dataset ("Orders") is opened,
|
|
the first 40 records are fetched from the server (assuming that you haven't
|
|
modified the <b>Max Records Per Fetch</b> setting). Try clicking on the vertical
|
|
scrollbar.
|
|
Initially, you will be displaying the other records fetched when the dataset
|
|
was opened. Once you have reached record 40, another batch of records are then
|
|
fetched from the server and you can see when this happens because the scrollbar
|
|
thumb reduces size.<br />OrderDetail records are only fetched as required.
|
|
</li>
|
|
<li>
|
|
<b>Fetch All</b>: retrieves all orders within the range specified. All
|
|
associated OrderDetail records are retrieved also.
|
|
</li>
|
|
</ul>
|
|
<h2>Examine the Code</h2>
|
|
<p>
|
|
The following methods are worth examining:
|
|
</p>
|
|
<ul>
|
|
<li>
|
|
<b>GetOrdersAndDetails</b> in <b>FetchService_Impl</b>: called by the<b> Fetch
|
|
All</b> page and it shows how to retrieve master and detail records in a single
|
|
server call.
|
|
</li>
|
|
<li>
|
|
<b>tbl_PagedOrdersAfterScroll</b> in <b>FetchClientMain</b>: holds the paging logic.
|
|
</li>
|
|
</ul>
|
|
|
|
</body>
|
|
</html> |