Author: Tomas Rutkauskas
BDE alias info
Answer:
The following function uses the GetAliasParams method of TSession to get the
directory mapping for an alias:
1 uses DbiProcs, DBiTypes;
2 3 function GetDataBaseDir(const Alias: string): string;
4 {* Will return the directory of the database given the alias5 (without trailing backslash) *}6 var7 sp: PChar;
8 Res: pDBDesc;
9 begin10 try11 New(Res);
12 sp := StrAlloc(length(Alias) + 1);
13 StrPCopy(sp, Alias);
14 if DbiGetDatabaseDesc(sp, Res) = 0 then15 Result := StrPas(Res^.szPhyName)
16 else17 Result := '';
18 finally19 StrDispose(sp);
20 Dispose(Res);
21 end;
22 end;