How to get BDE alias info
With the following function we can use the GetAliasParams method of TSession to get the directory mapping for an alias.
uses DbiProcs, DBiTypes;
function GetDataBaseDir(const Alias: string): string;
{* Will return the directory of the database given the alias
(without trailing backslash) *}
var
sp: PChar;
Res: pDBDesc;
begin
try
New(Res);
sp := StrAlloc(length(Alias) + 1);
StrPCopy(sp, Alias);
if DbiGetDatabaseDesc(sp, Res) = 0 then
Result := StrPas(Res^.szPhyName)
else
Result := ”;
finally
StrDispose(sp);
Dispose(Res);
end;
end;
SXSkinComponents is a set of visual components. But it's not...
RBarcode is a software component which can read barcodes. It...
This component is a mix between TTreeView and TListView ...
Smoothly animated menu. Features: Animated menu w...
Application settings management is a important and base pa...
Monday 12 Feb 2007 | Delphi Tutorial | Database