[lazarus] ... TDBGrid interbase problems ...
jesusrmx at yahoo.com.mx
Sat May 31 19:27:58 EDT 2003
Sorry answering after so long time :), and sorry too because i can't
link to the original message thread:
> Though, I also like the idea of displaying only the data when
> think we need help from you guys as to understanding why is it that
> cannot scroll backwards specially for tables with more 10
> Firebird. )
Michael appointed after that message that 10 records is probably
related to the
DefaultBufferCount = 10;
defined in dataset.inc
this is right!. Now, TDBgrid actually can do backward/forward scroll.
what happen is that TIBQuery "Implementation" explicitly deny this,
take a look at the following code in TIBQuery.GetRecord:
if FIsEOF then
Result := grEOF
Result := grOK;
case GetMode of
if Result = grOK then
with PIBBookmark(Buffer + FRecordSize)^ do
BookmarkData := FCurrentRecord;
BookmarkFlag := bfCurrent;
else if (Result = grError) then
once TIbQuery reach EOF it can't fetch more records, you have a
number a buffers allocated in TDataset (10) beyond this limit
TIBQuery can't fetch previous records, so if you reach record 23, you
will not be able to backscroll before record 13
TDataset buffer system is a cycled one and in this situation you can
see the buffers content cycling in the grid, this could be seen as an
error but I don't think it is so.
What can we do to get it working as it is, I'm affraid raising
artificially the TDataset.Buffercount by means of DbGrid's
FDatalink.Buffercount as Yoyong already done, until TIBQuery
implementation gets updated, maybe
FDataLink.BufferCount:=FDataLink.DataSet.RecordCount And updating on
trying to get the next record?
I hope this could be useful.
Jesus Reyes A.
Do You Yahoo!?
La mejor conexión a internet y 25MB extra a tu correo por $100 al mes. http://net.yahoo.com.mx
More information about the Lazarus