Page 1 of 2

New property FetchRow in ZDataSet

Posted: 26.05.2008, 22:23
by patyi
Hi all

I'm made some changes in ZAbstractRODataset.pas and ZDataset.pas.
The new peoperty FetchRow is added. When value of FethRow is 0 (zero)
then component is working exactly like before (this is the default value). When value of FetchRow is for example 50, max 50 rows is fetched or more, depend on initial visible rows number of DBGrid. On large tables this helps to avoid call of RecordCount and fetching all of rows.

The modifications is in attachment ...

What do you think abaut it ? Is it riscy to use or not ? :roll:

Posted: 26.05.2008, 23:01
by mdaems
Hi,

I know I could test it myself, but... I'm a little lazy :)
Does scrolling down in a grid (or calling next from a code loop ) still get all records? Or is this limited to the number of records mentioned in FetchRow?

Mark

Posted: 26.05.2008, 23:47
by patyi
Hi,

Scrolling down is fetching one by one record more.
Locate, Last, Sort etc. fetches all records.

You can test it making an simple program with DBGrid and
labels with RecNo and RecotdCount in captions...

Posted: 27.05.2008, 02:07
by gto
Hum!
This is very good at first sight!

I'm in the school now, tomorrow when I arrive at work I'll try it. It look's like a thing I tought was already built :)

Thanks patyi !

Posted: 30.05.2008, 13:13
by patyi
Hi gto !

Did you try it ?

patyi

Posted: 05.08.2008, 15:32
by patyi
Hi all !

I made patch to ZAbstractRODataset.pas and ZDataset.pas on new
Zeos 6.6.3-stabel. (it is in attachment)
Hou have simply replace this 2 files in src\Component folder,
recompile, and install the library.

Added new property : FetchRow (description is in my erlier posts)
and new method : FetchAll

Pleeeaaazzz test it and include it to final release if posible !!!! :lol:
(I use it widthout problems near 6 months !!)

Posted: 05.08.2008, 18:09
by Michael
Hi patyi,

I'm sorry but at the moment we have development freeze until final stable release. We will surely bear it in mind for the next versions. I'm sorry for that.

Best Regards and thank you for your contribution :cheers:

Michael.

Posted: 05.08.2008, 22:32
by patyi
Hi Michael !

Ok, in the next version ... :(

Posted: 06.08.2008, 08:08
by mdaems
Just to prove we're taking you serious : I just committed this to SVN testing branch. (look here)
This branch will be completely merged to trunk in a few weeks (after the friday event ;) has worked out). If testing doesn't reveal bugs it will be in next stable release. FYI : the test suite didn't fail. First small barrier is taken...

Posted: 06.08.2008, 16:28
by patyi
Hi mdaems !

I'm now hapy, and thanks ! :D
(I know that you are serius guys !)

Posted: 01.12.2009, 11:26
by arthurhabraken
Is this already implemented in the 6.6.5 release ?

Posted: 02.12.2009, 22:52
by mdaems
Arthur,
(Also saw your other post concerning this)

I did commit this to the 6.6-patches branch right now. (rev 738) One way or another it didn't get in yet. Suppose it just overlooked it when merging in other patches.

If you want to use it right away you can use the SVN version of that branch. Otherwise you'll have to wait till the next bugfix release (6.6.6)

Mark

Posted: 03.12.2009, 09:20
by arthurhabraken
I used the patch that was posted as a zip-file, but that doesn't seem to work. Do you agree with that ? Is that different than the SVN-version ?

Posted: 03.12.2009, 22:15
by mdaems
arthurhabraken,

When you used the patch, what component were you using to visualize the data? I'm not sure but the reason might be the grid fetching until eof anyway (instead of doing a recordcount which should take into account fetchrows).
But once more, I didn't try all zeoslib features myself yet. So it may very well being a failure of the fetchrows feature. Please, feel free to check what's wrong and propose a correction.

Mark

Need this urgent

Posted: 22.05.2010, 16:55
by sfxcc
I got 6.6.6 and this is not there ... when it is working ????


Give me a date pls.... to i check if i have to try do it by my self....

IVE done with zquery this : select * from table ROWS 1 to 5


So it gives rows 1 to 5 but this doesnt solve the problem . :blink:


How can i know how much pages of 5 rows exist or at least how many record have the table without asking all records.

:thanks: