Page 1 of 1
TMyCommand & TMyQuery
Posted: Mon 18 Apr 2005 05:30
by kenny
Hi,
Does it have any different by using TmyCommand or TMyQuery to execute the update SQL statement in term of speedwise?

Posted: Tue 19 Apr 2005 08:34
by Ikar
There is a difference but it is insignificant.
Posted: Tue 19 Apr 2005 09:39
by kenny
Hi,
So what is the main reason that to use Tmycommand and not use TmyQuery? Or, it just an alternative way to apply for?
Posted: Tue 19 Apr 2005 22:24
by Guest
MyQuery return a result set
use this for SELECT,SHOW CREATE
MyCommand does not
use for INSERT,UPDATE,CREATE,DROP,...
Posted: Wed 20 Apr 2005 02:09
by kenny
Yes, I knew the TmyQuery return a result set but TmyCommand not.
But since TMyQuery also able to use drop, create, show, insert, update other's than only SELECT statement.
I mean since TmyQuery can handle both DDL or DML of SQL. So, what is the main purpose/recommendation we use TMyCommand somemore? Or the TMyQuery is the extension of TMyCommand?

Posted: Wed 20 Apr 2005 09:16
by Ikar
TMyCommand has easier interface and a little bit faster execution. at the practise, if you place a new component to the form and know exactly that you will never use it for SELECT you should choose TMyCommand. As to performance, it greatly depends on hardware. Make a test for your conditions and you can get more exact answer.