Newbie question about TMyQuery and TMyTable
-
alan
Newbie question about TMyQuery and TMyTable
Could someone give me a brief explanation as to why one would want to use a TMyQuery over a TMyTable? It seems like either one could be used for many circumstances. Most of the examples out there seem to prefer TMyQuery.

Well, TMyQuery lets you drill-down data to what you need, you can also join tables etc. If you have for example a 1000 records, and you only need to show 5 records which have some common reference, then with a TMyQuery you just select those 5 (example select * from table where condition = xxx), and it would retrieve only those records from server, with TMyTable everything is retreived and then procesed locally. But best to know about why to use TMyQuery would be knowing SQL.