Board index » delphi » Re-initializing the BDE???

Re-initializing the BDE???

Can anyone help?  My problem is that I need to configure an ODBC data
source to point at different directories from within Delphi.  I can go
in and change the ODBC.INI just fine.  However, the BDE appears to cache
the connection and will not accept the change of directories until I
shut down and restart the program.  I experimented with the Oracle
ODBCTST program and can successfully reconnect from within there, so I
figure it's a BDE thing.

I went so far as to create and destroy my TQuery on the fly (button
clicks) but it looks as if destroying the Query doesn't release the
BDE.  I've also tried calling DbiExit and then DbiInit, but opening the
query gives an 'invalid parameter' error that I can't trace.

Any ideas on how to go about this?  Unfortunately, we're stuck with
uploading data from old files in different directories for the
forseeable future and our users won't put up with a different data
source for each directory (heck, I have a hard time setting up the BDE
myself!)

Any help out there?

Thanks

Jim Stanley
Jacobs Engineering

 

Re:Re-initializing the BDE???


I've had similar problems in the past (D1 accessing Foxpro). In the end
I set up muliple ODBC entries - 1 per directory - and then added
individual aliases for each in the BDE. This works OK, but I am glad to
see native FoxPro access.

Steve Griffiths

Quote
Jim Stanley wrote:
> Can anyone help?  My problem is that I need to configure an ODBC data
> source to point at different directories from within Delphi.  I can go

> in and change the ODBC.INI just fine.  However, the BDE appears to
> cache
> the connection and will not accept the change of directories until I
> shut down and restart the program.  I experimented with the Oracle
> ODBCTST program and can successfully reconnect from within there, so I

> figure it's a BDE thing.

> I went so far as to create and destroy my TQuery on the fly (button
> clicks) but it looks as if destroying the Query doesn't release the
> BDE.  I've also tried calling DbiExit and then DbiInit, but opening
> the
> query gives an 'invalid parameter' error that I can't trace.

> Any ideas on how to go about this?  Unfortunately, we're stuck with
> uploading data from old files in different directories for the
> forseeable future and our users won't put up with a different data
> source for each directory (heck, I have a hard time setting up the BDE

> myself!)

> Any help out there?

> Thanks

> Jim Stanley
> Jacobs Engineering

Other Threads