Wednesday, September 1, 2021

So You Want to Install the BDE...

I'm surprised how often the BDE still comes up in different Delphi programming discussions. People asking how to install it in recent versions of Delphi and even some who say they're using it for new development. Wild.

The documentation isn't all in one place and I keep having to look it up, so I thought I'd write it down.



First, ask yourself if you should

The BDE is a fantastic database access technology that helped cement Delphi's reputation as a top-tier enterprise development tool. A reputation that continues today.

However, the BDE and SQL Links in particular, was deprecated almost 20 years ago. This means there won't be any updates or bug fixes. It will never support Unicode and any issues installing and running on recent versions of Windows won't be addressed and may require some kind of work around. 

The last version of Delphi to include the BDE was XE6 or XE7 in 2014 and it's now only available as a separate download and install.

Face it, the day will come when the BDE will no longer be usable with the latest versions of Delphi.

You should not be using the BDE for development today. If you are actively using it, I strongly recommend moving away from it as soon as it's practical.


But if you absolutely have to...

If, for example, you are upgrading a project that already uses the BDE to a more recent version of Delphi, then it might make sense to continue using the BDE, at least temporarily.

The installation is a two-step process:


1) Install the BDE onto your computer

The installers for XE7 to 10.3 are available on CodeCentral's Registered Users page. Installers for 10.4 and up are on the new my.embrcadero download page. You can access these pages using your EDN account login.

And, of course, treat any third party downloads of the BDE as suspicious. I was a little surprised to stumble across a few of these while I was doing research for this post. If they aren't specifically from Embarcadero, use them at your own risk.

Download the installer for your version of the IDE, run it and follow the prompts. Simple.


2) Install the BDE into the IDE

Embarcadero's link to the installation instructions is broken, but can be found through the Wayback Machine. You're just manually installing the design-time package.


The specific .bpl for 10.4 can be found here:

C:\Program Files (x86)\Embarcadero\Studio\21.0\bin\dclbde270.bpl


Once the BDE design-time package is installed, you'll see the BDE components in the tool palette:


If not the BDE, then what?



Since XE5, the recommended data access technology is FireDAC, formerly known as AnyDAC until Embarcadero acquired it.

Using these direct access components is surprisingly familiar for anyone who has used the BDE, but they're much more powerful and offer lots of additional functionality. This similarity to the BDE helps when migrating applications using tools like reFind.

There is plenty of documentation and examples, but Cary Jensen literally wrote the book on the subject. If you're working with FireDAC, I strongly encourage you to get a copy of Delphi in Depth: FireDAC.



Or, if you're so inclined, you have other options:

  • dbGo - Formerly called ADO Express, but Microsoft objected.
  • dbExpress - The technology for which the BDE was deprecated.
  • Any number of third party components like UniDAC from devart.


But seriously, maybe avoid using the BDE.


3 comments:

Max said...

I have been using Absolute Database from Component Ace for about five years. It's a great BDE replacement for desktop apps (and the developer has not charged for upgrades to newer versions of Delphi during all this time).

Gary Mugford said...

Just in case you DO want to end up using BDE in a network environment ... PLEASE find an alternative (NexusDB works best for me). That said, sometimes we are held hostage by our historical data accumulation or legacy software that is a couple millions lines of code.

My lessons: Windows 10 using Windows Server ACTIVELY hates BDE. In fact, it is common amongst users at one client to get the message that BDE Alias cannot be found. It happens in the aftermath of a Windows update and forgets where the location is for the shared configuration file (previously stored in WIN.INI). Write the instructions to run BDEadmin.exe and step through it. PICTURES are good.

Things were going OK with only rare runnings of the PDXrebuilder app to fix Paradox databases. Then the 2017 Fall update put scotch to that. Data got corrupted as many as seven times a day, requiring all 50 users to exit ALL applications accessing the data. Run Rebuilder to rebuild things and then get ready for as little as ten minutes of programming peace. Wash, Rinse, Repeat. What SOLVED that was moving the DATA to a different server than the programs. Previously, the data was in a sub-folder at the same level as the executables. (T:\data\ActiveData ==> U:\ActiveData and T:\data\Apps) We stopped corruption almost dead cold. However, we are getting periodic disruption on the drive devoted to applications and we are going to attempt to move the exe of the MAIN program to yet a third server hoping to solve that issue.

I had to remove a font load in the main program, which affected some Zebra labels, because Windows 10 just doesn't like the way I did it. I assume. The code had worked this millennium till it stopped. Removing that code and replacing the labels in ReportPrinter files made the issue go away.

Other than that, if YOU MUST, then follow the instructions easily found on the Internet and have at it. Your Sanity May Vary.

The Chief Priest said...

I dumped BDE a long time ago in favour of dbExpress and then FireDac