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

Add database aliases to BDE at runtime

This function that will let you add database aliases to BDE (Borland Database engine) during run time:

uses
    DBIProcs, DBITypes;
 
  procedure AddBDEAlias(sAliasName, sAliasPath, sDBDriver: string);
  var
    h : hDBISes;
  begin
    DBIInit(nil);
    DBIStartSession('dummy', h, '');
    DBIAddAlias(nil, PChar(sAliasName), PChar(sDBDriver),
                PChar('PATH:' + sAliasPath), True );
    DBICloseSession(h);
    DBIExit;
  end;
 
 
 { Sample call to create an alias called WORK_DATA that }
 { points to the C:\WORK\DATA directory and uses the    }
 { DBASE driver as the default database driver:         }
 
  AddBDEAlias('WORK_DATA', 'C:\WORK\DATA', 'DBASE');
 

Generated 8:01:17 on Apr 24, 2018