Page 1 of 1

Acess a record anywhere

Posted: 12.08.2010, 21:14
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

Posted: 16.08.2010, 14:38
by guidoaerts
just do a separate query :
select * from foo where recno = 6000000;

Guido

Posted: 16.08.2010, 18:29
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

Posted: 17.08.2010, 11:04
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