Migrating a BDE Application to DBExpress

I migrated a BDE Three Tier Server Application to use the DBExpress Data Access Layer, which was developped under Delphi 7. First I evaluated, if the native DBExpress driver delivered with Borland Delphi 7 was able to do the Job - unfortunately I found out that it was not able to handle the follwing featutres:

- "IN" clauses like "SELECT * FROM A WHERE A.KEYVALUE in B.(SELECT B.FOREIGNKEY FROM B WHRE B.IMORTANTFIELD LIKE 'IMOPRTANT EXPRESSION' " are unpported. As far as I know, this has not changed until BDS 2006
- The RowCount feature of an TDataset is not usable with Quries, which use a "GROUP BY", because the DBExpress Driver does a "SELECT COUNT * FROM (" + Query.SQlText + ")" - This obviously does not work for complex Queries

I evalutaed the marked and found commercial DBexpress Drivers from Corelabs, which are feature rich and performant. This hre th reason, why we choosed Corelabs. But there where more Problems, which need to get fixed.

The First Thing I did, was to change the Code, so that it Compiles either an BDE or an DBExpress Version of the Server Application with $IFDEF compiler directives. This Workeed fine. I introduced a strange class which was derived either from a TQuery or an TSQLQuery depending on the compiler switch. This handling made sure, that we ahere allways able to rebuild the existing BDE Code in case of any Problem.

But espacially the Date handling was different under the DBExpress Layer. [TO BE CONTINUED]