GetAliasNames (C++)

From RAD Studio Code Examples
Jump to: navigation, search

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