I am learning BDE adminstrator and I was wondering if there was a way to write a script/command(that i can run by double clicking) to add the net dir to a certain directory path ? I looked through the windows registry editor, and tried to find the net dir but it was not there.
The NET DIR setting is stored in the BDS configuration file. This file, by default, is named IDAPI.CFG and is stored in %PROGRAMFILES%\Borland\Borland Shared\BDE\IDAPI.CFG
. It can be changed to a different name and location by changing the registry at HKEY_LOCAL_MACHINE/Software/Borland/Database Engine/CONFIGFILE01
. There are naming restrictions regarding what the file can be renamed.
There is no setting in the registry that can change the NET DIR location. It has to be done through this configuration file.
For more info, see the BDE32.hlp
file, by default located in %PROGRAMFILES%\Common Files\Borland Shared\BDE
, under the topic NET DIR (which leads you to the Configuration management section in the help file).
As a note: The BDE has been deprecated for more than a decade, and is no longer being maintained or supported, as can be seen by the fact it still uses an old 16-bit compatible WinHelp file for documentation. It doesn't work properly on modern Windows versions without some effort. Spending time learning to use the BDE Administrator seems like a poor idea, seeing as how the BDE installation is no longer being distributed by Embarcadero (the current owners of the brand).
There's no script that I know of.
Delphi sets it by Session.SetNetFileDir(), which in turns calls a BDE API DbiSetProp() for the sesNETFILE property. If you can find a way to compile Delphi code, you can write a DLL that would allow you to script it.
More generally, because Delphi calls a function in a BDE DLL, specifically DbiSetProp(), to set the NET directory value, there are other options. There's nothing special to these DLLs, so the BDE API provided by these BDE DLLs should be accessible via other languages (e.g. C). And I'm pretty sure the BDE API comes with the BDE, and not Delphi. The downside is that there might be some involved initialisation of the BDE that may need to be coded too.
Okay, so it's not a script, but I'm not a fan of no solution answers.
来源:https://stackoverflow.com/questions/26783807/bde-administrator-net-dir