Add Multi DataBuffers - URGENT ANSWER
Posted: 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
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