Показать сообщение отдельно
  #6  
Старый 10.09.2012, 23:12
sorockinalex sorockinalex вне форума
Начинающий
 
Регистрация: 08.08.2012
Сообщения: 178
Репутация: 10
По умолчанию

блин, не работает:
Код:
procedure FillStringGrid(SG : TStringGrid; LBL: TLabel);

....

procedure TFOilGasSprt.FillStringGrid(SG : TStringGrid; LBL: TLabel);
var
  i,j:integer;
  RecCnt:Cardinal;
begin
  With DM, Self, SG do
  begin
      RecCnt:=Query.RecordCount;
      //Количество строк согласно количеству записей запроса
      LBL.Caption:=IntTostr(RecCnt);
      if RecCnt=0 then RowCount:=2
      Else if RecCnt=1 then RowCount:=2 else RowCount:=RecCnt+1;
      //Очищаем MissionsStringGrid от старых значений
      j:=0;
      while (Cells[0,j]<>'') do
      begin
        j:=j+1;
        Rows[j].Clear;
      end;
      //Заполняем MissionsStringGrid данными из запроса
      If RecCnt<>0 then
      begin
        for j:=1 to RecCnt do
        begin
          for i:=0 to Query.Fields.Count-1 do Cells[i,j]:=Query.Fields[i].AsString;
          Query.Next;
        end;
      end;
  end;
end;

.....

procedure TFOilGasSprt.MissionsRefresh();
begin
  MissionsFilter();
//  FillMissionsStringGrid();
FillStringGrid(MissionsStringGrid, MissionsCount);
end;

Undeclared Identifier MissionsCount в процедуре MissionsRefresh();
Ответить с цитированием