Вниз
Скачать: CL | DM;

Количество файлов в DataBase   Найти похожие ветки 

← →
Voldemar ©   (2002-04-14 23:24) [0]

Доброе время суток!
Подскажите, плз, можно ли узнать именно через свойства DataBase, сколько таблиц (файлов .db) содержится в данный момент в алиасе?


← →
DPashin   (2002-04-15 08:57) [1]


//uses bde
procedure fDbiOpenTableList(DB:TDataBase; TableList: TStrings);
var
hCursor : hDBICur;
ListDesc : TBLBaseDesc;
begin
Check(DbiOpenTableList(DB.Handle, False, False, "*", hCursor));
TableList.Clear;
while (DbiGetNextRecord(hCursor, dbiNOLOCK, @ListDesc, nil) = dbiErr_None) do
TableList.Add(ListDesc.szName);
end;


← →
Kuusiniemi ©   (2002-04-15 10:21) [2]

А Session.GetTableNames не проще вызвать?


← →
AlexLi   (2002-04-15 11:43) [3]

Session.DataBases[i].DataSetCount


← →
Kuusiniemi ©   (2002-04-15 14:56) [4]

2 AlexLi.
Из хелпа: DataSetCount - "Indicates the number of active datasets associated with the connection component."
то есть это количество TDataset, которые в данный момент работают. А если использую ДВА TDataset, а БД у меня сотня таблиц???


← →
Севостьянов Игорь ©   (2002-04-16 12:06) [5]

Согласен с Kuusiniemi © (15.04.02 10:21)
Ребята иногда полезно читать HELP

GetTableNames Example
MyStringList := TStringList.Create;
try
Session.GetTableNames("DBDEMOS", "*.db",False, False, MyStringList);
{ Add the table names to a list box }
ListBox1.Items = MyStringList;
finally
MyStringList.Free;
end;



Страницы: 1 вся ветка

Скачать: CL | DM;



Память: 0.46 MB
Время: 0.01 c
1-26103
Дмитрий Д.
2002-04-26 14:09
2002.05.09
Как определить число в строке или нет ?


7-26276
Broot
2002-02-01 11:57
2002.05.09
Раскладка клавиатуры


1-26118
IDL
2002-04-24 12:54
2002.05.09
Закрытие проги после закрытия ПОСЛЕДНЕГО окна?


3-26046
Druger
2002-04-13 01:52
2002.05.09
DBGrid & Float


14-26261
Владислав
2002-04-02 18:56
2002.05.09
Проблема с Borland C++ Builder 5.




   Наверх