GetAliasNames (C++)
Description
This example calls the TSession GetAliasNames method to fill the list box with Borland Database Engine (BDE) alias names.
Code
void __fastcall TAdhocForm::Button1Click(TObject *Sender)
{
TStringList *MyStringList = new TStringList();
try
{
Session->GetAliasNames(MyStringList);
// fill a list box with alias names for the user to select from
for (int I = 0; I < MyStringList->Count; I++)
ListBox1->Items->Add(MyStringList->Strings[I]);
}
__finally
{
delete MyStringList;
}
}
Uses
- Bde.DBTables.TSession.GetAliasNames ( fr | de | ja )
- System.Classes.TStrings.Count ( fr | de | ja )