Go Back   Wiki NewForum > Career Forum (Documents/Tutorials/Advice) > Tech Forum & Tutorial > Oracle Database, SQL, Application, Programming

Reply
Views: 413 Source: CNN18.com, India-Forums, TellyChakkar, India, Times of India, Youtube, BollywoodLife, Rediff  
Thread Tools Rate Thread Display Modes
  #1  
Old 08-20-2010, 11:23 AM
bholas bholas is offline
Award Winner
 
Join Date:
Apr 2010
Posts: 5,198
Default How to add database aliases to BDE at run time

Here's a 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;
For example, if you want to create an alias called WORK_DATA that points to the C:\WORK\DATA directory and use DBASE driver as the default database driver:
AddBDEAlias(
'WORK_DATA',
'C:\WORK\DATA',
'DBASE' );



Ads
Reply With Quote
Reply

New topics in Oracle Database, SQL, Application, Programming

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump


All times are GMT. The time now is 04:44 PM.


Powered by vBulletin® Version 3.8.10
Copyright ©2000 - 2017, vBulletin Solutions, Inc.