运行时动态添加别名
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;