Add Multi DataBuffers - URGENT ANSWER

Freature requests from users for ZeosLib's DBOs

Moderators: gto, cipto_kh, EgonHugeist, mdaems

sfxcc
Senior Boarder
Senior Boarder
Posts: 95
Joined: 13.05.2010, 18:48

Add Multi DataBuffers - URGENT ANSWER

Postby sfxcc » 14.08.2010, 14:14

Hi,i was looking for the dataset , datalink datasource and i found it is a primitive way to acess data because it have only 1 data window by currentrecord till buffercount records < or > of currentrecord.

So for special components with multiple "record acess" it is needed to acess data in several areas but it must move the cursor(current record) to get the datalink buffercount data available .


So i had this ideia.

If you control the data flow (your components), u can create multiple data flows (record buffers for each the zflobaldatalinks) where each datalink acess where it needs without moving the cursor to other position.

TzGlobalDatalink = class(TDatalink)
MEMRECORDS:array[buffercount] of pchar; //the saved records of buffersize to but from this datalink.
Updatemembufferwhendatachanges : boolean;
End;



Tztable,zquery ... = Class (???)
protected
GlobalDatalink []: Tlist;
end;

U can use the same way o get the data to the ztable buffer but save it in the zglobaldatalinkbuffer.

Then we can create several zglobaldatalinks to access where we want ...
on db without moving cursor.

This is extremely useful for a special dbgrid im developing.
(didnt change zeos code yet cause i ll need always to update version and then always doing the changes on the updated code)... and lost a lot of time trying to understand how it works testeing ,, getting my brain burned ... :(

You know how it works :) so is easy for u do a patch with this.

Can you do this ????? Need to know if u ll because if wou dont i ll have to do it by my self.

Thank you very much.

SF
where's the code ..

andrevanzuydam
Zeos Dev Team
Zeos Dev Team
Posts: 32
Joined: 22.10.2005, 08:53
Location: Bloemfontein
Contact:

Postby andrevanzuydam » 15.08.2010, 09:34

Hi SF

If I understand you correctly you want to cache data in memory, are you only talking about access via TZTable or all Zeos components ? I have done this type of manipulation with an inmemory dataset which loads from a zeos component and then one can manipulate the data, at the end of the session the data is written back to database. I needed to do this for an application which needed fast processing and couldn't wait for IO between the database and the client side over the network.

It would be good to build a test scenario for study I suppose so that one has a test case to study the application of what you want to achieve. I for one would be interested in your grid and whether it would be Lazarus compatible.

Cheers

Andre
Image
Nothing is impossible!

sfxcc
Senior Boarder
Senior Boarder
Posts: 95
Joined: 13.05.2010, 18:48

TMYDBTreeView - Is Lazarus Compatible

Postby sfxcc » 15.08.2010, 12:24

It suppose to work with all zeos datasets or all dataset descendent.
I dont think copying the data to a local dataset is good idea becaus e i have it on some part of other softwares and it stays a bit slow (im thinking this could work without slowing at least with 3 million rows).

Im doing this because some grids asked me 300 eur 1400 eur . 3000 eur.

So i thought, i know how to do this so ...
The grid is almost done ... and i have this "little" problem.
It have + - child items .. ill do next a vertical grid to insert in child items... etc.


If datalink could request and cache its own window (buffercount record) it would be perfect otherwise i have to try the inmemory dataset or clientdataset as you say.

The multiple datalink is great for master/detail because detail dataset could have several datalinks with is own datacached.

for example u move 1 row it will filter the detail dataset with the master field row.

So i have 5 rows on screen and each of that row have a child row (witch is another table detail)

I have to draw the grid so i have to go to 1 row and filter the detail dataset Draw the child row witch is the inside grid.
(each row can have its own diffrent height)

Then to 2 row and filter again the detail dataset. Draw this child row.

... etc. without moving the cursor.

I can do this with the cursor moving and it works with disablecontrols. The problem is if you have a tdbgrid or even on this one it will center the current row to the grid middle.


I did a treeview component in delphi in mind this dbgrid, i change it to lazarus because is multiplatform.

When i scroll the window (i have 2 ways TS_PIXEL,TS_ITEM) if is TS_PIXEL i dont what to scroll the cursor along but if is TS_ITEM i could be(not done yet).

The grid is working have inplace editor auto resize col with % or fixed resize is working fine, i need to do grouping on grid and footer(column totalizer) is ready to receive this last to 2 ideas.

The problem is to this grid work fine i have to do buffercount=$00FFFFF on my datalink, is working fine with 50000 record it takes a bit doing on gotolast or saving data on the last records. so i need only to do buffercount = (height-title-groupdockbar) div minItemheight;


SO i need to get a Datalink that doesnt move the cursor of the ztable
because if i have the currentrecord = 10 when it scrolls i need to paint the grid withou to move the cursor so i need to get the records data.


Is this possible ??


So i need a solution... if u have an ideia here is my
email : sfxcc@hotmail.com

Thanks
SF
where's the code ..


Return to “Feature Requests”

Who is online

Users browsing this forum: No registered users and 1 guest