TMyCommand & TMyQuery

TMyCommand & TMyQuery

Postby kenny » Mon 18 Apr 2005 05:30

Hi,

Does it have any different by using TmyCommand or TMyQuery to execute the update SQL statement in term of speedwise?
:?:
kenny
 
Posts: 43
Joined: Mon 15 Nov 2004 08:48
Location: Malaysia

Postby Ikar » Tue 19 Apr 2005 08:34

There is a difference but it is insignificant.
Ikar
 
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Postby kenny » Tue 19 Apr 2005 09:39

Hi,
So what is the main reason that to use Tmycommand and not use TmyQuery? Or, it just an alternative way to apply for?
kenny
 
Posts: 43
Joined: Mon 15 Nov 2004 08:48
Location: Malaysia

Postby Guest » Tue 19 Apr 2005 22:24

MyQuery return a result set
use this for SELECT,SHOW CREATE
MyCommand does not
use for INSERT,UPDATE,CREATE,DROP,...
Guest
 

Postby kenny » Wed 20 Apr 2005 02:09

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? :wink:
kenny
 
Posts: 43
Joined: Mon 15 Nov 2004 08:48
Location: Malaysia

Postby Ikar » Wed 20 Apr 2005 09:16

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.
Ikar
 
Posts: 1693
Joined: Thu 28 Oct 2004 13:56


Return to MySQL Data Access Components