TAstaClientDataSet.SetToDisConnectedMasterDetail
Applies to
TAstaClientDataSet
Declaration
procedure SetToDisconnectedMasterDetail(FullSelectString,
DetailLinkField: string);
Description
This allows a master/detail
relationship to be implemented by fetching the complete detail table and using local filters. Often performance
can be improved using this technique.
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;