I'm trying to assign the number of records to the rowCount of a stringgrid control. See the following code fragment:

var
  stock  : stockitem;
  rowNum : integer;
  {inventory is defined as a file of stockitem in another unit}

begin
  assignfile(inventory,'Ops');
  reset(inventory);
  stgInvOps.RowCount:= filesize(inventory);

When I compile the program, I get:

dashboard.pas(115,42) Error: Incompatible type for arg no. 1: Got "File Of StockItem", expected "AnsiString" with 'inventory' highlighted
on the line "stgInvOps.RowCount:= filesize(inventory);"

What am I doing wrong?

-Chris

--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to