ADO or DBX using Delphi ADO or DBX using Delphi database database

ADO or DBX using Delphi


ADO is simple to use and is there, you only must make sure to install the correponding client driver in the client side.

I found DBX more flexible and it is better integrated within IDE and another technologies like DataSnap.

For the same purpose than you, I have used DBX with Third Party Drivers from DevArt.You can compile the drivers with your application if you buy the drivers sources.


In the beginning of Delphi, people praised the multi-DBMS support in Delphi. Everyone loved the BDE (because that was the only way to do that).

But when looking at customers over more then the past decade, I have seen a steady decrease of multi-DBMS support in their applications.

The cost of supporting multiple DBMS from one application is high.

Not only because you have to have knowledge of each DBMS, but also because each DBMS has its own set of pecularities, where you have to adapt for in your data access layer. These not only include differences in syntax and underlying data types, but also optimization strategies.

Also, some DBMS work better with ADO, some better with a direct connection (like skipping your Oracle client all together).

Finally testing all the combinations of your software with multiple DBMS systems is very intensive.

I've been involved in a few projects where we had to change the DBMS backend and/or the data access technology (from i.e. BDE to DBX, or from DBX to a direct connection). Changing the backend always was much more painfull than changing the data access technology. Multi-tier approaches made them somewhat easier, but increased the degrees of freedom and therefor the testing efforts.

Some of products that I do see that support multi-DBMS are in vertical market applications where the final customer already has their own DBMS infrastructure and the application needs to adapt to that. For instance in Dutch governmental areas, Oracle has been really strong, but SQL Server has established quite a user base as well.

So you need to think about what combinations of DBMS you want to support, not only in terms of functionality, but also in terms of cost.

If you stick to one DBMS, then it makes no sense to go for a generic data access layer like BDE, DBX or ADO: it pays off doing a connection as direct as possible.My experience has taught me that these combinations do work well:

Hope this gives you some insight in the possibilities and limitations of supporting multiple DBMS from your Delphi applications.

--jeroen


General rule: every layer of components will possibly add an additional layer of bugs. Both ADO and DBX are component wrappers around standard database functionality, thus they're both equally strong.So the proper choice should be based on other factors, like the databases that you want to use. If you want to connect to MS-Access or SQL Server, ADO would be the better choice since it's more native for these databases. But Firebird and Oracle are more native for the DBX components.

I personally tend to use the raw ADO API's, though. Then again, I don't use data-aware components in my projects. It's less RAD, I know. But I often need to work this way because I generally write client/server applications with several layers between the database and the GUI, thus making things more complicated.