![]() |
|
#1
|
|||
|
|||
|
Hay, how can I get Mysql database or table size, i'm using zeos lib?
Thanks! |
|
#2
|
|||
|
|||
|
Sorry no one has helped you. I can't help because I know nothing about MySQL administration. Here is a Forum which might help you. Not too many Delphi programmers there but they know their stuff when it comes to databases.
http://www.dbforums.com/f5 I hope this helps. |
|
#3
|
|||
|
|||
|
Code:
var
DL, IL: Integer;
TN: String;
begin
ZQuery1.SQL.Text := 'SHOW TABLE STATUS';
ZQuery1.Open;
DL := 0; IL := 0;
ZQuery1.First;
while not ZQuery1.EOF do
begin
TN := ZQuery1.FieldByName('Name').AsString;
DL := DL + ZQuery1.FieldByName('Data_length').AsInteger;
IL := IL + ZQuery1.FieldByName('Index_length').AsInteger;
Memo1.Lines.Add('Table: ' + TN + ' Size:' + IntToStr(DL + IL));
ZQuery1.Next;
end;
Memo1.Lines.Add('Database Size: ' + IntToStr( DL + IL));
ZQuery1.CLose;
end;
other info returned with "SHOW TABLE STATUS' MrBaseball34 Hook'Em Horns!
|
|
#4
|
|||
|
|||
|
Did the example work for you?
MrBaseball34 Hook'Em Horns!
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|