How to get rows affected Count of RefreshQuick command

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Mahmood_M
Posts: 20
Joined: Thu 24 Sep 2015 21:18

How to get rows affected Count of RefreshQuick command

Post by Mahmood_M » Sat 26 Sep 2015 22:18

hi
I have a Query ( TUniQuery ) and I should refresh it repeatedly and after refresh I should copy its data on a Memory-table

I use RefreshQuick(True) method of UniQuery but I want to know the new data have any changed rows or not , if there is changed rows , I do copying otherwise no copy !

Is it possible ? and how ?

I set the StrictUpdate to True and try to get RowAffected value after RefreshQuick method , but sometimes I know that there is no changes in table but RowAffected return 1 ( or 0 ) and many times ! I know there is some changes on table but , RowAffected returns 0 !

How it works ?

thanks ...

azyk
Devart Team
Posts: 1119
Joined: Fri 11 Apr 2014 11:47
Location: Alpha Centauri A

Re: How to get rows affected Count of RefreshQuick command

Post by azyk » Mon 28 Sep 2015 13:31

Please specify the database you are working with.

Mahmood_M
Posts: 20
Joined: Thu 24 Sep 2015 21:18

Re: How to get rows affected Count of RefreshQuick command

Post by Mahmood_M » Mon 28 Sep 2015 18:34

I am using MySQL (InnoDB)

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: How to get rows affected Count of RefreshQuick command

Post by ViktorV » Tue 29 Sep 2015 08:54

You can use the RowsAffected property to retrieve the number of rows affected by the modify query. It returns the number of rows changed, deleted, or inserted by the LAST STATEMENT if it was an UPDATE, DELETE, or INSERT.
If you want to use the RowsAffected property after execution of the RefreshQuick method for accurate retrieving of the number of records affected on the server, please post a suggestion at our user voice forum: h[url]ttp://devart.uservoice.com/forums/104635-delphi-data-access-components/category/18939-unidac[/url] . If the suggestion gets a lot of votes, we will consider the possibility to implement it.

Post Reply