This is a serious problem for us, and it is not solved in the 4.0.7.1 version of DOA. I also tried this using both Delphi 6 and Delphi 2005, and this makes no difference.
The situation we have is the following: we have a number of queries using UNION, or based on views which in turn also use UNION. The application has been built and tested on Oracle 9. When testing it on Oracle 10, we get a "Type mismatch expecting Float, actual Integer" error message.
Different customers use different versions of the Oracle platform, and we have a strict requirement that different versions of the application shall be backwards compatible. The number of queries involved is large. A simple search and replace of all floatfields converting them to integerfields is not feasible due to the backwards compatibility requirement and the differing oracle database versions at different customer sites. Also some of the floatfields actually are real floats. So we have a fairly complex situation.
I have been debugging a test application to try and find a way to solve this. The exception is raised from TDataset in DB.pas, from a protected, virtual method called CheckFieldCompatibility.
I tried to override this method and simply ignore the fact that the field definition was not the expected one, but the values shown in an ordinary dbGrid then came out completely wrong.
I then tried (still in the overridden CheckFieldCompatibility) to create a new field object with the same properties and events but with another field type, and delete the original field object. This also fails.
I tried a similar approach in an overridden version of the InternalOpen method, but at that point the FieldDefs are not available so this fails as well.
Is there anyone else with the same problem, and have you found a way to cope with this? Marco, will you please try to fix this?
With regards,
Helene