Define BDE alias

Posted in Databases

Use DbiAddAlias function with necessary parameters. Example shows adding STANDARD alias.

uses  DBIProcs, DBITypes;
...
procedure TForm1.Button3Click(Sender: TObject);
var
  AliasName, AliasPath: string;
begin
  AliasName:='TESTAlias2';
  AliasPath:='PATH:C:\Tools';
  Check(
    DbiAddAlias(
      nil, 
      PChar(AliasName), 
      nil, 
      PChar(AliasPath), 
      True));
end;