var oDetails: TList; lIsMaster: Boolean; ... oDetails := TList.Create; try myDataSet.GetDetailDataSets(oDetails); lIsMaster := oDetails.Count > 0; finally oDetails.Free; end;