Главная страница | назад





Article #20100: "Expected type..." error using ADO to access numbers in Oracle Table.


Question:
Why am I getting "Expected type was..." error using ADO to access numbers in an Oracle table?

Answer:
The problem lies in the fact that Integer fields in Oracle are being represented as TFloatfield in Delphi. The root of this issue is the translation done by the OLE DB PROVIDER. NUMBER and INTEGER fields in Oracle are being translated as DBTYPE_NUMERIC by the OLE DB PROVIDER. This can be verified by looking at the MDAC SDK documentation, which is available off the Microsoft web page. If the provider never returns an Integer OLE DB Data Type, you'll never get a TField that is a TIntegerField type.

Last Modified: 11-OCT-00