Board index » delphi » info from idapi.cfg

info from idapi.cfg

Dear,
Is there a function/procedure that can extract information from the BDE
configuration
file.
If you know the alias of a database how to get the \\machine\path\name
of the
database
Thanks for your attention
Teunis
 

Re:info from idapi.cfg


On Tue, 01 Feb 2000 14:34:45 -0500, Teunis Middelkoop

Quote
<teuni...@interneeds.net> wrote:
>Is there a function/procedure that can extract information from the BDE
>configuration file. If you know the alias of a database how to get the
>\\machine\path\name of the database

You do not necessarily need to go into the BDE configuration for this
particular piece of information. You should be able to get what you need
through the TSession.GetAliasParams method. This method populates a
pre-existing string list object with the parameters that define a BDE
alias.

In this list, one parameter will contain the database location. For local
database types (Paradox, dBASE, FoxPro) this will be the PATH parameter.
For SQL databases (accessed through other than ODBC), see the SERVER NAME
or DATABASE parameter. For databases eccessed via ODBC, though, you need to
go into the DSN for the ODBC driver (see the Windows utility program ODBC
Data Source Administrator in the Control Panel). I believe that getting
this bit of information from an ODBC DSN requires a call to an ODBC API
function.

==========================================================================
Steve Koterski                  "Computers are useless. They can only give
Technical Publications          you answers."
Borland                                       -- Pablo Picasso (1881-1973)
http://www.borland.com/techpubs/delphi

Other Threads