1

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.

0

2 Answers 2

5

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).

4
  • 2
    The BDE configuration file is NOT a text file. Most text editors will reduce IDAPI.CFG to a useless mess. Use a scriptable HEX editor instead. You don't need to decode the entire file format, as the path argument you want to change is a null-terminated string. Nov 8, 2014 at 12:53
  • 1
    @A.I.Breveleri: Correction made. My memory failed me. :-) Thanks.
    – Ken White
    Nov 8, 2014 at 14:56
  • 1
    The BDE is frozen, but still exists. It's distributable through as the "Paradox Runtime" by Corel. Corel licensed it from Borland (or whichever subsequent entity owned Delphi and Paradox at the time, like Embarcadero) because their "office" suite still uses it. It does have flaws, but there's still old software out there that may force one to have to use it.
    – FreeText
    Sep 15, 2015 at 21:35
  • @FreeText: The BDE (which was Borland's Database Engine) is as defunct as Borland. It was taken off life-support about a year ago by Embarcadero (the current owners of the product), removed from their distribution packages, and is no longer maintained or supported. Sure, you can find a lot of old software that uses it, but if you're actively developing a project now you should have removed it 10 years ago and replaced it with something more modern that is still alive (and that plays well with modern operating systems, which the BDE does not). I'm sure Win 1.0 still exists somewhere. :-)
    – Ken White
    Sep 15, 2015 at 23:44
2

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.