Board index » delphi » Path of a BDE alias

Path of a BDE alias

Hi folks,

I need to know the path of a Bde alias.  I looking for Bde API help but I
didn't find nothing...

Thank's for all help...

 

Re:Path of a BDE alias


Quote
>Jefferson schrieb in Nachricht <37e7eaf...@news.americasnet.com>...
>Hi folks,

>I need to know the path of a Bde alias.  I looking for Bde API help but I
>didn't find nothing...

>Thank's for all help...

I think you can use the TSession component for this.
The GetAliasParams procedure "returns" a filled string list with all
parameters for the desired alias name.
In that list you will find a value for PATH.
There is a TSession called Session created automatically as the default
session when you use any data-sensitve components in your application.
So the code could look like:

function GetBDEAliasPath(const SName:string):string;
var AList:TStringList;
begin
    AList:=TStringList.Create;
    Session.GetAliasParams(SName, AList);
    GetBDEAliasPath:=AList.Values['PATH'];
    AList.Free;
end;

Hth,
Matthias.

Other Threads