DelphiFAQ Home Search:
General :: Programming :: Delphi :: Database
Database development with Delphi. Includes issues with BDE, ADO and InterBase.

Articles:

This list is sorted by recent document popularity (not total page views).
New documents will first appear at the bottom.

Only the 40 most recently viewed articles are shown.
You can see the full list here.

Featured Article

BDE alias info

The following function usees 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;
 
You don't like the formatting? Check out SourceCoder then!
Generated 16:01:23 on Nov 12, 2018