Acess a record anywhere

In this forum we will discuss things relating the ZEOSLib 6.6.x stable versions

Moderators: gto, EgonHugeist

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

Acess a record anywhere

Post by sfxcc »

how can i acess a record any where without moving the cursor.


for example :
cursor pos = 7 and i want to acess pos 6000000 without move the curso or use disable controls.

ex : im on pos 7 currently and buffercount = 100;

for aa:= 600000 to 6000010 do
begin
datalink.activerecord := aa;
getrecorddata();
end;


It is possible ??
I tried Tdatalink but didnt work or i use datalink.buffercount = dataset.recordcount ( witch is not good ) or i have prob getting values.


Thanks
SF
where's the code ..
guidoaerts
Senior Boarder
Senior Boarder
Posts: 93
Joined: 01.07.2009, 16:07

Post by guidoaerts »

just do a separate query :
select * from foo where recno = 6000000;

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

Post by sfxcc »

Ok,
I didnt try yet , but a need a real good speed this is when i scroll my dbtreeview window?


Does zeos table query always ???

I was reading zeos code it seams it reads as needed and caches what it reads. this is correct???

There is any way to not resync ? (request again all record ) when i go to last or when i post a change.

If i do buffercount=$00fffff it works but when i pos or go to last record it does resync and hangs up till read the fetch recors till the current record .. this is relativeli fast on the first records but on a 50000 is takes a lot ..

There is any way to solve this ...

Thanks
SF
where's the code ..
guidoaerts
Senior Boarder
Senior Boarder
Posts: 93
Joined: 01.07.2009, 16:07

Post by guidoaerts »

I didn't try this, but you could override the default fetch size, by setting the statement.fetchsize to a small value. Then you can pos the cursor anywhere, but if you do it by scrolling your dbtreeview window it will run through the data anyway.
and maybe take a look at : http://zeos.firmos.at/viewtopic.php?p=8580#8580

Guido
Post Reply