Adding alias to BDE at run time 
Author Message
 Adding alias to BDE at run time

How can I add an alias to BDE at run time?

I tried:

procedure AddBDEAlias(sAliasName,sAliasPath,sDBDriver : string );
var h : hDBISes;
  begin
    DBIInit( nil );
      DBIStartSession( 'dummy', h, '' );
      DBIAddAlias( nil,PChar( sAliasName ),
Char( sDBDriver ),PChar( 'PATH:' + sAliasPath ),True );
      DBICloseSession( h );
      DBIExit;
  end;

calling the procedure with

AddBDEAlias('AliasName',ExtractFilePath(Application.EXEName)+'DBFile.mdb','M
SACCESS' );

but it doesn't seem to work.

Thanks
Yael Kollet



Wed, 18 Jun 1902 08:00:00 GMT
 Adding alias to BDE at run time

You can call a Session.AddAlias or simply view a sources of this procedure.

--
With best regards, Mike Shkolnik.
FIDO: 2:463/106.14


WEB: http://www.geocities.com/SiliconValley/Grid/3989

Yael Kollet D??? ???Y?? ...

Quote:
>How can I add an alias to BDE at run time?

>I tried:

>procedure AddBDEAlias(sAliasName,sAliasPath,sDBDriver : string );
>var h : hDBISes;
>  begin
>    DBIInit( nil );
>      DBIStartSession( 'dummy', h, '' );
>      DBIAddAlias( nil,PChar( sAliasName ),
>Char( sDBDriver ),PChar( 'PATH:' + sAliasPath ),True );
>      DBICloseSession( h );
>      DBIExit;
>  end;

>calling the procedure with

>AddBDEAlias('AliasName',ExtractFilePath(Application.EXEName)+'DBFile.mdb','
M
>SACCESS' );

>but it doesn't seem to work.

>Thanks
>Yael Kollet




Wed, 18 Jun 1902 08:00:00 GMT
 
 [ 2 post ] 

 Relevant Pages 

1. Change path of BDE-alias at run-time

2. Change BDE alias in run-time ?

3. Change BDE alias in run-time ?

4. Changing/adding DB-Aliases run-time

5. Add an alias at run-time

6. how to add a BDE alias at runtime?

7. Adding and deleteing BDE aliases in Delphi 1.0

8. Variation on old theme - Adding BDE Aliases at runtime

9. BDE - Add Alias at Runtime???

10. BDE: Add/Delete Alias

11. Creating new aliases in BDE without running BDECFG?

12. aliases path at run time


 
Powered by phpBB® Forum Software