Change path of BDE-alias at run-time 
Author Message
 Change path of BDE-alias at run-time

Hello everybody

I have a little problem. Is it possible to change the path of an
existing BDE-alias from a Delphi application. I know that is is
API-calls to add a new alias and delete an existing alias. Is it an
API-call to configure an existing BDE-alias.

Hope someone can help me with this.

J?rn Walle
Norway



Sat, 23 Oct 1999 03:00:00 GMT
 Change path of BDE-alias at run-time



Quote:
> Hello everybody

> I have a little problem. Is it possible to change the path of an
> existing BDE-alias from a Delphi application. I know that is is
> API-calls to add a new alias and delete an existing alias. Is it an
> API-call to configure an existing BDE-alias.

> Hope someone can help me with this.

> J?rn Walle
> Norway

Are you using Delphi 2.0 +

If so, you can use modifyalias to change the alias on the fly.  However,
before your running app knows about the change, you have to close down the
tdatabase object that represents that alias.

Each application has a tsession variable which contains an array of
tdatabases, one tdatabase for each alias your using.  You can use the
finddatabase method if you have more than one alias. Once you have found
your database in the session.databases array, simply close the tdatabase
object. All datasets for that alias will then close.  The database object
will 'open' the next time any dataset opens.

For example...

session.databases[0].close;

will close the first tdatabase in the databases array.



Sat, 23 Oct 1999 03:00:00 GMT
 
 [ 2 post ] 

 Relevant Pages 

1. Change BDE alias in run-time ?

2. Change BDE alias in run-time ?

3. aliases path at run time

4. Adding alias to BDE at run time

5. Help: Change Alias in BDE at runtime with Delphi 1.0

6. Help: How to change BDE path in runtime?

7. Changing/adding DB-Aliases run-time

8. changing alias in run-time..no effect ?

9. Changing the location of alias at run-time

10. Changing an alias at run-time

11. Reading the database path from the BDE Aliases

12. Extracting path from BDE alias or database?


 
Powered by phpBB® Forum Software