From da5a961ae0015802b5f518286ba9e0274643315f Mon Sep 17 00:00:00 2001 From: michael Date: Sat, 21 Aug 2004 21:10:00 +0000 Subject: [PATCH] * Patch from Joost van der Sluis - Empty recordsets don't show any bogus data anymore - Floatfiels.gettext fix - SetBufListsize fix forTDBGrid --- fcl/db/dataset.inc | 27 ++++++++++++++++++--------- fcl/db/fields.inc | 10 ++++++++-- 2 files changed, 26 insertions(+), 11 deletions(-) diff --git a/fcl/db/dataset.inc b/fcl/db/dataset.inc index cea0972c72..9a57c2457c 100644 --- a/fcl/db/dataset.inc +++ b/fcl/db/dataset.inc @@ -325,6 +325,7 @@ begin {$endif} FRecordcount := 0; RecalcBufListSize; + FEOF := (FRecordcount = 0); {$ifdef dsdebug} Writeln ('Setting state to browse'); {$endif} @@ -697,13 +698,6 @@ begin Writeln('Setting buffer list size'); {$endif} - if (ABuffercount -1) and (FActiveRecord>Value-1) then + begin + for i := 0 to (FActiveRecord-Value) do + shiftbuffersbackward; + FActiverecord := Value -1; + end; + If Assigned(FBuffers) then begin For I:=Value+1 to FBufferCount do FreeRecordBuffer(FBuffers[i]); ReAllocMem(FBuffers,(Value+1)*SizeOf(Pchar)); end; + if FRecordcount > Value then FRecordcount := Value; end; If Value=-1 then Value:=0; @@ -1547,7 +1549,8 @@ begin exit; end; FCurrentRecord := 0; - + FEOF := false; + FBOF := false; // If we've arrived here, FBuffer[0] is the current record If (rmCenter in Mode) then @@ -1685,7 +1688,13 @@ end; { $Log$ - Revision 1.19 2004-08-14 12:46:36 michael + Revision 1.20 2004-08-21 21:10:00 michael + * Patch from Joost van der Sluis + - Empty recordsets don't show any bogus data anymore + - Floatfiels.gettext fix + - SetBufListsize fix forTDBGrid + + Revision 1.19 2004/08/14 12:46:36 michael + Patch from Joost van der Sluis to implement Modified and UpdateRecord event Revision 1.18 2004/08/13 07:06:02 michael diff --git a/fcl/db/fields.inc b/fcl/db/fields.inc index 82a668ae4e..28e6c2bf83 100644 --- a/fcl/db/fields.inc +++ b/fcl/db/fields.inc @@ -1049,7 +1049,7 @@ begin TheText:=FormatFloat(fmt,E) else } - Text:=FloatToStrF(E,ffgeneral,FPrecision,0); + TheText:=FloatToStrF(E,ffgeneral,FPrecision,0); end; procedure TFloatField.SetAsFloat(AValue: Double); @@ -1865,7 +1865,13 @@ end; { $Log$ - Revision 1.14 2004-08-01 13:00:29 michael + Revision 1.15 2004-08-21 21:10:00 michael + * Patch from Joost van der Sluis + - Empty recordsets don't show any bogus data anymore + - Floatfiels.gettext fix + - SetBufListsize fix forTDBGrid + + Revision 1.14 2004/08/01 13:00:29 michael + Patch for Tlongintfield by Joost van der Sluis Revision 1.13 2004/07/19 20:27:29 michael