Order and save right now!
20% off with the 729824315 dicscount code for Ultimate Pack and any another product for Delphi from Greatis Programming! |
⤷ Get directory from BDE-alias
You can use GetAliasParams method of TSession:Session.GetAliasParams(AliasName, StringList)
or DbiGetDatabaseDesc of DBIProcs:
uses DBIProcs, DBITypes;
...
procedure TForm1.Button2Click(Sender: TObject);
var
StringList: TStringList;
DbDes: DBDesc;
begin
StringList:=TStringList.Create;
try
Check(DbiGetDatabaseDesc(PChar(AliasName2.Text), @DbDes));
with DbDes do
begin
StringList.Add('Driver Name: '+szDbType);
StringList.Add('AliasName: '+szName);
StringList.Add('Text: '+szText);
StringList.Add('Physical Name/Path: '+szPhyName);
end;
ListBox2.Items:=StringList;
finally
StringList.Free;
end;
end;
-
More for developers