TAstaClientDataSet.SetToConnectedMasterDetail
Applies to
TAstaClientDataSet
Declaration
procedure SetToConnectedMasterDetail(SQLStr: string);
Description
This has the effect of setting up a detail parameterized query to allow a master/detail relationship
to be used with the TAstaClientDataSet. Use this call at run time to toggle back and forth between a master/detail
relationship that fetches the detail data from the remote server on each row change of the master table
or when using filters on the detail table after fetching the complete detail dataset.
Example
with DetailDataSet do
if Button.Tag = 0 then begin
SetToDisconnectedMasterDetail('SELECT * FROM Orders ORDER BY OrderNo',
'CustNo');
Button.Tag := 1;
Button.Caption : ='Set to run master/detail from Server';
end
else begin
SetToConnectedMasterDetail('SELECT * FROM Orders WHERE Custno =
:CustomerNumber');
Button.Caption := 'Set to run master/detail Locally';
Button.Tag := 0;
end;