Page 1 of 1
					
				Newbie question about TMyQuery and TMyTable
				Posted: Wed  07 Jun 2006 17:29
				by alan
				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.
 
 
			 
			
					
				
				Posted: Wed  07 Jun 2006 22:08
				by GEswin
				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.
			 
			
					
				
				Posted: Thu  08 Jun 2006 09:47
				by Antaeus
				GEswin is right. MyQuery is more flexible than MyTable. But if you need just to get all data from table on the server to client application, MyTable is more convenient. It generates SELECT query itself.