
Reading the database path from the BDE Aliases
Quote:
> I am trying to get the directory where the tables in a specific database
> are stored so as to copy all the files to a floppy disk. The files
> could be stored anywhere at install but the BDE alias holds the
> pathname. I am trying to get the path out of the AliasParams property
> of the delphi created TSession component. The docs say that is is a
> global variable Session but I cannot seem to access it. Any insight
> would be appreciated
> thanks
> jack
Perhaps this code would help:
var
i : Integer;
lines : TStringList;
path : string;
begin
lines:=TStringList.Create;
Session.GetAliasParams('FAKTURA',lines);
for i:=0 to lines.count-1 do
begin
if Copy(lines[i],1,5)='PATH=' then
path:=Copy(lines[i],6,255);
end;
lines.Free;
end;
/Tomas