Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

master detail search

Status
Not open for further replies.

Leo

Programmer
Mar 17, 1999
4
US
When searching a detail table with a master/detail relationship is there a quicker way than closing the master table, doing the search and then opening up the master table again.<br>
 
I usually search a couple of different ways.&nbsp;&nbsp;One is to break the link between master and detial table, search the detail table and then link them back up.&nbsp;&nbsp;example Table2.Mastersource := nil;&nbsp;&nbsp;Table2.Mastersource := Datasource1;<br>Another and simpler way is to use another table that is not linked to the master at all.&nbsp;&nbsp;Just set it up with whatever index you want to use.&nbsp;&nbsp;This can be handy for things like searching a database before posting to it to check for duplicate entries rather than posting and getting a key violation.&nbsp;&nbsp;Hope this helps.<br>Dave
 
Best way it´s:<br><br>I recommended you use other TTable object to do this.<br>Problems can occurs when you use the same object for<br>searching and master-detail/source linking. <br><br>You must understand that one mastersource apply a range<br>over detail-table and if you break this link will work slowly. Never you must use the same object.<br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top