Найден 1 результат

Nicholas
Пт 16 дек 2011 19:18
Форум: SQL Server Data Access Components
Тема: Assertion failure in MemData.pas, line 2662
Ответы: 1
Просмотры: 4864

Assertion failure in MemData.pas, line 2662

Äîáðîãî âðåìåíè ñóòîê.
Delphi XE Version 15.0.3953.35171
SDac 6.0.2.

Код: Выделить всё

First chance exception at $74F9B9BC. Exception class EAssertionFailed with message 'Assertion failure (...\MemData.pas, line 2662)'.
FetchAll=false;

Îøèáêà âîçíèêàåò ïðè èñïîëüçîâàíèè êîìïîíåíòà ExpressQuantumGrid Suite 2011 v1.7, êîíðåòíî ïðè èçìåíåíèè áóôåðà îòðèñîâêè ñòðîê GridModeBufferCount
TcxDBDataModeController.GridModeBufferCount

Specifies the number of dataset records loaded from a dataset in a single operation.

property GridModeBufferCount: Integer;

Description
Use the GridModeBufferCount property to specify the number of dataset records loaded from a dataset to the data controller at once. This option is active only when the data controller is in Grid mode.

By default, GridModeBufferCount is set to 0. This indicates that controls incorporating a data controller need to calculate the size of the buffer automatically based on the screen resolution and record height. ExpressQuantumGrid, for instance, calculates the size of the buffer by determining the number of records that can be displayed within the screen window.

If GridModeBufferCount is set to a value greater than 0, the buffer size is determined by this value.



The default value of the GridModeBufferCount property is 0.
 ñîáûòèè AfterFetch(DataSet: TCustomDADataSet) êîìïîíåíòà TMSQuery èçìåíÿåòñÿ GridModeBufferCount, êîòîðîìó ïðèñâàèâàåòñÿ êîë-âî ïîëó÷åííûõ çàïèñåé:

Код: Выделить всё

procedure TChildGridMode.qrMainAfterFetch(DataSet: TCustomDADataSet);
begin
  inherited;
    begin
      FFetchedRecord := FFetchedRecord + DataSet.FetchRows;
      with tblView1.DataController.DataModeController do
      if GridModeBufferCount  FFetchedRecord then
        GridModeBufferCount := FFetchedRecord;    
    end;
end;
Îòêðûâàåì MsQuery è íà÷èíàåì ñêðîëèòü òàáëèöó. Ñîáûòèå AfterFetch ñðàáàòûâàåò äâà ðàçà. Ïîñëå âòîðîãî ñðàáàòûâàíèÿ ïðîäîëæàåì ñêðîëèòü è ïîëó÷àåì èñêëþ÷åíèå... :cry: