PRB: Oracle Numeric Fields Must be Converted for Logical TestsID: Q178043
|
When you use an Oracle numeric field a "Type Mismatch" error occurs.
The error occurs in the following two scenarios:
If Oracle_Recordset("my_numeric_field")=1 then ...
-or-
x=Oracle_Recordset("my_numeric_field")+ 1
The following two conditions cause this behavior:
The following conversion functions return values that are comparable to
integers:
If CLng(Oracle_Recordset("my_numeric_field"))=1 then ...
x=CLng(Oracle_Recordset("my_numeric_field"))+ 1
Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article.
Oracle uses a numeric data type. If an integer value is stored in a numeric field, some ODBC drivers (for example, Intersolv version 3.01) returns a data type of double-precision floating point (that is, VBScript VarType of 5); other drivers (for example, Microsoft ODBC for Oracle version 2.73.7269) more accurately returns numeric data type (that is, VBScript VarType 14). In all cases, the ADO Type property returns type 131 (that is, numeric).
Additional query words: kbdsi
Keywords : kb3rdparty kbADO100 kbADO150 kbADO200 kbDatabase kbOracle kbVBp500 kbVBp600
Version : WINDOWS:1.0,1.5,2.0
Platform : WINDOWS
Issue type : kbprb
Last Reviewed: March 16, 1999