TIBCSQL.RowsAffected always returns 0?

Discussion of open issues, suggestions and bugs regarding IBDAC (InterBase Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
upscene
Posts: 306
Joined: Thu 19 Oct 2006 08:13

TIBCSQL.RowsAffected always returns 0?

Post by upscene » Tue 15 Dec 2009 16:25

Hi,

In my application, I do a DELETE for a table that has rows, but RowsAffected returns 0, can you confirm that?


With regards,

Martijn Tonies
Upscene Productions

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Thu 17 Dec 2009 08:55

RowsAffected works in TIBCSQL only if the component is prepared. This is a performance optimization.

upscene
Posts: 306
Joined: Thu 19 Oct 2006 08:13

Post by upscene » Thu 17 Dec 2009 08:58

Plash wrote:RowsAffected works in TIBCSQL only if the component is prepared. This is a performance optimization.
Please make it work when not preparing, there's hardly a point for the developer to prepare a statement manually when only executing something once and without parameters.


Thanks.


Martijn Tonies
Upscene Productions

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Fri 18 Dec 2009 10:43

You can use the TIBCQuery component instead of TIBCSQL. TIBCSQL is indended to obtain maximum performance. But actually its performance is approximately the same as that of TIBCQuery (if both of them query the count of rows affected).

Post Reply