TMyCommand & TMyQuery

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
kenny
Posts: 43
Joined: Mon 15 Nov 2004 08:48
Location: Malaysia
Contact:

TMyCommand & TMyQuery

Post by 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?
:?:

Ikar
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Post by Ikar » Tue 19 Apr 2005 08:34

There is a difference but it is insignificant.

kenny
Posts: 43
Joined: Mon 15 Nov 2004 08:48
Location: Malaysia
Contact:

Post by 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?

Guest

Post by 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,...

kenny
Posts: 43
Joined: Mon 15 Nov 2004 08:48
Location: Malaysia
Contact:

Post by 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:

Ikar
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Post by 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.

Post Reply