mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-07-31 19:06:09 +02:00
+ fixed dataset opening buffer issues
This commit is contained in:
parent
c71bf952e1
commit
18f0316d81
@ -690,6 +690,9 @@ procedure TDataSet.SetBufferCount(const AValue: Longint);
|
|||||||
Var
|
Var
|
||||||
ShiftCount: Integer;
|
ShiftCount: Integer;
|
||||||
begin
|
begin
|
||||||
|
{$ifdef dsdebug}
|
||||||
|
Writeln('in SetBufferCount(',AValue,')');
|
||||||
|
{$endif}
|
||||||
If (FBufferCount=AValue) Then
|
If (FBufferCount=AValue) Then
|
||||||
exit;
|
exit;
|
||||||
If AValue<FRecordCount Then
|
If AValue<FRecordCount Then
|
||||||
@ -1461,9 +1464,15 @@ var
|
|||||||
i, j, MaxValue: Integer;
|
i, j, MaxValue: Integer;
|
||||||
DataLink: TDataLink;
|
DataLink: TDataLink;
|
||||||
begin
|
begin
|
||||||
|
{$ifdef dsdebug}
|
||||||
|
Writeln('Recalculating buffer list size - check cursor');
|
||||||
|
{$endif}
|
||||||
If Not IsCursorOpen Then
|
If Not IsCursorOpen Then
|
||||||
Exit;
|
Exit;
|
||||||
MaxValue := 0;
|
{$ifdef dsdebug}
|
||||||
|
Writeln('Recalculating buffer list size');
|
||||||
|
{$endif}
|
||||||
|
MaxValue := DefaultBufferCount;
|
||||||
for i := 0 to FDataSources.Count - 1 do
|
for i := 0 to FDataSources.Count - 1 do
|
||||||
for j := 0 to TDataSource(FDataSources[i]).DataLinks.Count - 1 do
|
for j := 0 to TDataSource(FDataSources[i]).DataLinks.Count - 1 do
|
||||||
begin
|
begin
|
||||||
@ -1471,6 +1480,9 @@ begin
|
|||||||
if DataLink.BufferCount>MaxValue then
|
if DataLink.BufferCount>MaxValue then
|
||||||
MaxValue:=DataLink.BufferCount;
|
MaxValue:=DataLink.BufferCount;
|
||||||
end;
|
end;
|
||||||
|
{$ifdef dsdebug}
|
||||||
|
Writeln('calling Setbuffercount');
|
||||||
|
{$endif}
|
||||||
SetBufferCount(MaxValue); //SetBufListSize(MaxValue);
|
SetBufferCount(MaxValue); //SetBufListSize(MaxValue);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -1672,7 +1684,10 @@ end;
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.7 2003-02-20 19:25:19 michael
|
Revision 1.8 2003-05-06 12:08:52 michael
|
||||||
|
+ fixed dataset opening buffer issues
|
||||||
|
|
||||||
|
Revision 1.7 2003/02/20 19:25:19 michael
|
||||||
+ Fixes from Jesus Reyes
|
+ Fixes from Jesus Reyes
|
||||||
|
|
||||||
Revision 1.6 2002/09/07 15:15:22 peter
|
Revision 1.6 2002/09/07 15:15:22 peter
|
||||||
|
Loading…
Reference in New Issue
Block a user