GetAliasNames (Delphi)
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
- Bde.DBTables.TSession.GetAliasNames ( fr | de | ja )
- System.Classes.TStrings.Count ( fr | de | ja )