Tamanho do Banco de Dados

Delphi

08/12/2003

COMO POSSO MOSTRAR EM UM LABEL O TAMANHO EM Mega Bits DO MEU BD ?

[i:7083367159]Título editado. Digite em minúsculas. (marcelo.c - Moderador)[/i:7083367159]


Crcam

Crcam

Curtidas 0

Respostas

Maicongabriel

Maicongabriel

08/12/2003

function TamanhoDoDB(Arquivo: String): String;
begin
with TFileStream.Create(Arquivo, fmShareDenyNone) do
try
Result := FormatFloat(´,0´, (Size div 1024)) + ´ MB´;
finally
Free;
end;
end;

[i:73953b45c8]// chame a função assim:[/i:73953b45c8]
Label1.Caption := TamanhoDoDB(´C:\BancoDeDados.DB´);


GOSTEI 0
_||bern||_

_||bern||_

08/12/2003

Da uma olhadinha na função getfilesize!!


GOSTEI 0
POSTAR