Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 2 of 2 total
Thread DBISAM TableSize
Thu, Jun 21 2007 4:01 PMPermanent Link

Praveen
Hi Guys,

I'm using DBISAM 3.20. In dbisam 4.x TDBISAMTable.TableSize gives the bytes occupied by the table.
How do I calculate this in 3.20 ? Can I do Table.RecordSize * Table.RecordCount ? Will this give the same result as TableSize ?

Thanks
Praveen.
Fri, Jun 22 2007 6:41 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Praveen,

<< I'm using DBISAM 3.20. In dbisam 4.x TDBISAMTable.TableSize gives the
bytes occupied by the table.
How do I calculate this in 3.20 ? Can I do Table.RecordSize *
Table.RecordCount ? Will this give the same result as TableSize ? >>

The only way is to use the OS methods for obtaining the file sizes of the
table's files (.dat, .idx, .blb):

function OSSizeOfFile(const Value: string): Int64;
var
  SearchRec: TSearchRec;
  TempResult: Integer;
begin
  Result:=0;
  TempResult:=FindFirst(Value,0,SearchRec);
  if (TempResult=0) then
     begin
     {$WARNINGS OFF}
     Int64Rec(Result).Lo:=SearchRec.FindData.nFileSizeLow;
     Int64Rec(Result).Hi:=SearchRec.FindData.nFileSizeHigh;
     {$WARNINGS ON}
     end;
  SysUtils.FindClose(SearchRec);
end;

--
Tim Young
Elevate Software
www.elevatesoft.com

Image