I have a SQL Server 2008 DataBase with 2 Table : Master and Detail
Master Fields : ID and ... ;
Detail Fields : ID , MasterID and ... ;
I have been set the relationship between Master and Detail in SQL Server
I want when I Select a record in Master DBGrid , Detail Query returns only records related to selected Master Record and Detail DBGrid Show only Related records
I dont want to Requery Detail ADOQuery everytime I select a Master Record with such as SQL Code ( for Example ) :
SELECT * FROM Detail WHERE MasterID = Master.ID
how can i do this without using ADOTable ( Master Source ) !?
in other words i want this Relationship be in DB Layer !
TTable
descendant compoents. Do you actually needTADOQuery
instead ofTADOTable
, which hasMasterSource
property? – teran