Delphi .NET (2) Database (71) Delphi IDE (90) Network (39) Printing (3) Strings (12) VCL (83) Windows with Delphi (280)
Exchange Links About this site Links to us 
|
Add database aliases to BDE at runtime
This article has not been rated yet. After reading, feel free to leave comments and rate it.
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;
AddBDEAlias('WORK_DATA', 'C:\WORK\DATA', 'DBASE');
| |  | |  |
Comments:
|