GetAliasNames (Delphi)

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

procedure TAdhocForm.Button1Click(Sender: TObject);
var
  MyStringList: TStringList;
  I: Integer;
begin
  MyStringList := TStringList.Create;
  try
    Session.GetAliasNames(MyStringList);
    { Fill a list box with alias names for the user to select from. }
    for I := 0 to MyStringList.Count - 1 do
      ListBox1.Items.Add(MyStringList[I]);
  finally
    MyStringList.Free;
  end;
end;

Uses

Personal tools
Assistance