DBX difference between Delphi 7 and 2009

By | December 31, 2008

There is a little but very annoying TSQLQuery difference between DBX 2.5 (Delphi 7) and DBX 4 (Delphi 2009). If you open a TSQLQuery and it doesn’t return any record then Delphi 2009 will raise an exception (no further rows available) if you access the fields. Delphi 7 didn’t raise that exception but returned NULL. And so was it used in our projects. It is wrong because you should first test for Eof but it worked and was used. That means if we migrate our code base to Delphi 2009, we (or should I say I  🙄 ) have to check every usage of TSQLQuery. That will cost a lot of time.
Fortunately in the end when I have finished this, our code will be much more correct. And having a look at all the code that wasn’t touched for years might bring some not yet recognized bugs to light.

2 thoughts on “DBX difference between Delphi 7 and 2009

  1. Kyle A. Miller

    That problem popped up again? I remember reporting that issue in 2005 or 2006. It was fixed in an update, but I guess it came back. Grrr….

  2. Tijmen

    That is why we do not use delphi components directly. We first inherit from it and then only use the inherited version. We fixed all these kind of probems in this layer by overriding methods or redefining properties. It even made it possible for us to move from BDE to DBExpress with only a view changes.

Comments are closed.