Encountered this problem, the database of a field, such as l_id type is number (10)
Database connection: BDE
Database: oracle 10.2.0
Problem when adding fields, l_id is number (10) fair to say add fields should correspond to the TIntegerField
But the results are elected TFloatField.
Pas and dfm manually edit the file type field, will be set to true error TQuery
('Type mismatch for field "xxxx", expecting: Integer actual: Float')
Connection is not the
For here, there should be a type conversion problem, why would have been a integer delphi, bde to identify precisely, into float. google about Chinese web page first, some people have encountered the problem, but no one answers, or not fully buttoned
CodeGear, finally found suggests:
Highlights in this section:
There is an TIntegerField which is receiving a field from a query. The declaration of the field in the database is number (10, 0). It is a known attribute of Oracle that all number fields are stored internally as floats. The automatic conversion of these fields in BDE is governed by settings in the BDE Admin utility under the Configuration / Drivers / Native key. For Oracle 8i to enable the return of integers you must change the entries for DLL32, Vendor Init and enable integers. This much I think is true.
Check my BDEADMIN, drivers in the native-oracle, the will enable integer set to true, shut down restart effect, to D5 pilot, NND, still does not work. Then check the database of built examples, there is also a enable integer, to edit and try again, finally able to identify TIntegerField the.
Analysis] [Oracle is not integral to this concept, only one data type, number, integer and floating-point can Definition, eventually the Oracle stored in Du Bei Cun to float (in the end Du Shi Qi Shi Zi Fuchuan ); the BDE data type conversion in the control switch is normally set to false (except integer addition there are BCD). Necessary to open.
[Comments] BDE Murder Case
[Conclusion] Delphi really goes down, the attention to those little ...