IDAPI Configuration Reference

IDAPI Configuration Reference

Post by Timothy A. Da » Sat, 28 Sep 1996 04:00:00



Can anyone offer suggestions on the following:

The installation of Delphi, and corresponding BDE creates an entry in
the WIN.INI similar to the following:

[IDAPI]
CONFIGFILE01=C:\IDAPI\IDAPI.CFG

... which of course is the location of the idapi.cfg file containing
database alias information etc.  

The problem I am having is that I have two distinct idapi
configurations, and I want to point to one or the other at run time.
Does anyone know how, or if it is possible, to code an application to
directly reference an alternate idapi.cfg ie:

... I would like to have something like the following in my WIN.INI:

[IDAPI]
CONFIGFILE01=C:\IDAPI\IDAPI.CFG
CONFIGFILE02=C:\IDAPI\TESTER.CFG

and be able to tell my application at run time which idapi config file
to look at.  Any suggestions would be appreciated.

Timothy Dahm.

 
 
 

IDAPI Configuration Reference

Post by krajc.. » Sat, 28 Sep 1996 04:00:00




>Subject: IDAPI Configuration Reference
>Date: Fri, 27 Sep 1996 04:47:12 GMT
>Can anyone offer suggestions on the following:
>The installation of Delphi, and corresponding BDE creates an entry in
>the WIN.INI similar to the following:
>[IDAPI]
>CONFIGFILE01=C:\IDAPI\IDAPI.CFG
>... which of course is the location of the idapi.cfg file containing
>database alias information etc.  
>The problem I am having is that I have two distinct idapi
>configurations, and I want to point to one or the other at run time.
>Does anyone know how, or if it is possible, to code an application to
>directly reference an alternate idapi.cfg ie:
>... I would like to have something like the following in my WIN.INI:
>[IDAPI]
>CONFIGFILE01=C:\IDAPI\IDAPI.CFG
>CONFIGFILE02=C:\IDAPI\TESTER.CFG
>and be able to tell my application at run time which idapi config file
>to look at.  Any suggestions would be appreciated.
>Timothy Dahm.

Timothy:

Can you shed some light on why you are attempting to do this?  Rather than ask
us how to implement a specific solution, you might get some alternatives that
would better solve the problem.

I say this because I recently went through a struggle trying to setup multiple
test environments and a production one.  After trying to force Delphi to do it
my way, and not succeeding, someone else here on the newsgroup pointed me in
an entirely different direction that is far better than the kludge I was
trying to force in.

So, I'd be real careful trying to fool windows and the BDE with alternate
configurations, but there may be a better way to solve your problem if only we
knew what it was.

(Don't mean to be lecturing you.....cause I really want to help.....plus, you
never know, I may soon or may already have faced a similar problem)

-Dave

 
 
 

IDAPI Configuration Reference

Post by Timothy A. Da » Wed, 02 Oct 1996 04:00:00





>>Subject: IDAPI Configuration Reference
>>Date: Fri, 27 Sep 1996 04:47:12 GMT
>>Can anyone offer suggestions on the following:
>>The installation of Delphi, and corresponding BDE creates an entry in
>>the WIN.INI similar to the following:
>>[IDAPI]
>>CONFIGFILE01=C:\IDAPI\IDAPI.CFG
>>... which of course is the location of the idapi.cfg file containing
>>database alias information etc.  
>>The problem I am having is that I have two distinct idapi
>>configurations, and I want to point to one or the other at run time.
>>Does anyone know how, or if it is possible, to code an application to
>>directly reference an alternate idapi.cfg ie:
>>... I would like to have something like the following in my WIN.INI:
>>[IDAPI]
>>CONFIGFILE01=C:\IDAPI\IDAPI.CFG
>>CONFIGFILE02=C:\IDAPI\TESTER.CFG
>>and be able to tell my application at run time which idapi config file
>>to look at.  Any suggestions would be appreciated.
>>Timothy Dahm.
>Timothy:
>Can you shed some light on why you are attempting to do this?  Rather than ask
>us how to implement a specific solution, you might get some alternatives that
>would better solve the problem.
>I say this because I recently went through a struggle trying to setup multiple
>test environments and a production one.  After trying to force Delphi to do it
>my way, and not succeeding, someone else here on the newsgroup pointed me in
>an entirely different direction that is far better than the kludge I was
>trying to force in.
>So, I'd be real careful trying to fool windows and the BDE with alternate
>configurations, but there may be a better way to solve your problem if only we
>knew what it was.
>(Don't mean to be lecturing you.....cause I really want to help.....plus, you
>never know, I may soon or may already have faced a similar problem)
>-Dave

Hi Dave, thanks for the response:

In a nutshell:

I have a situation where a client has developed several Paradox
applications (which of course use IDAPI).  They strongly desire that
the existing IDAPI.CFG file description not be altered in any way,
which of course leaves me in a tight situation.  Currently, my kludgy
solution is to grab the win.ini file, alter it to point to my
idapi.cfg, then alter it back to its' original state after the
application terminates.  This works fine, unless my application
happens to hang somewhere along the line.

Tim.

 
 
 

IDAPI Configuration Reference

Post by Nigel Anderso » Wed, 09 Oct 1996 04:00:00


I certainly would like to know how to handle multiple IDAPI
configs neatly as well
if e.g you are using D1 and D2 to connect to different databases

 
 
 

IDAPI Configuration Reference

Post by James H. Grigg » Thu, 10 Oct 1996 04:00:00



> I certainly would like to know how to handle multiple IDAPI
> configs neatly as well
> if e.g you are using D1 and D2 to connect to different databases

Yes, I would like to know as well.  The problem is that even though you
can create different aliases for paradox databases, the pdoxnet file is
the same for all...this is a real problem in some cases.  Delphi 2.0
allows you to specify different pdox.net files and private directories
for tables via a TSession component.

--
James Griggs
Cytometry Associates, Inc.
Brentwood, TN

 
 
 

1. IDAPI Configuration Reference

Hi Timothy, you wrote once:

Works fine, you say? I wonder how do you manage to do this.
I tried to do the same (changing win.ini when my program start),
but in vain. When any Delphi application begin to work,
IDAPI configuration becomes loaded into memory, so after
program start I can change only the string in the win.ini file:

CONFIGFILE01=C:\NewPath\NewCfg.CFG

instead of

CONFIGFILE01=C:\IDAPI\IDAPI.CFG

But this changing will have no effect, because IDAPI is already
in memory up to the moment with its old configuration tunings.

So my question is: how do you solve this problem?
The logic says, that there must be a way to force
IDAPI to reload the configuration parameters at run-time,
and you know this way. Please explain it.
Best regards.
--
Leonid Schavelev.
Ivanovo, RUSSIA.
http://www.polytech.ivanovo.su/~leonid

2. FoxPro ? Paradox?

3. BUGS idapi BUGS idapi BUGS idapi BUGS

4. Single processor SQL 2000 on dual processor server

5. Lotus Notes ODBC and BDE IDAPI Configuration

6. UNICODE string to ADO data type adVarChar

7. Idapi configuration error

8. about .dll

9. Idapi configuration.

10. Problems with Ingres and BDE configuration - idapi.cfg (1/1)

11. IDAPI configuration and record locking

12. Problems with Ingres and BDE configuration - idapi.cfg (0/1)