DBExpress Mystery
I was playing around with Delphi XE’s dbexpress feature the other day and I came across a very unusual situation and it concerns the contents of the dbxdrivers.ini file.
The test program I wrote uses the TSQLConnection which connects to a Firebird database. I’ve used this component in earlier versions of Delphi and it worked like a charm. I’ve had no problems connecting to the database using the open source dbexpress library dbxfirebird.
But when I executed the program I received this message:
It is the first time that I encountered such a message. So I started to investigate. I thought that the problem code be the character set of the database so I deleted and recreated it. Ran the program, same error. Uninstalled and then reinstalled the Firebird database server. Nope. Still the same error.
I revisited the other application that I wrote that used the same library (dbxfirebird) and everything worked. So I looked into the configuration file that gets loaded when the program run.
Hmmm….everything looks OK. Same error kept coming up, whatever I do. And then I had a closer look at the other dbxdrivers.ini used by my other applications and I noticed that the last entry has the word database written as Database. So I changed database to Database and then ran the program. And this time the program worked!
Could it be a fluke so I edited the ini file again to have ‘database’ instead of ‘Database’ and I got the error again. This is highly unusual because I have not come across like this wherein the entry in an INI file is affected by how it is written.
So hopefully, for those who encounter the same problem this discovery could be a possible solution.

Twitter
LinkedIn
Facebook
No Comments