February 14th, 2003, 04:16 PM
Type Mismatch Reading Number From Oracle
I am developping an app in ASP that connects to an Oracle database. I have just discovered the following problem:
When I read data from a column defined as data type 'Number' in Oracle, and I reference it in ADO say like...
if rs.Fields(2).Value <> 0 then
I get a type mismatch even though it would appear to be a number. If I do:
isNumeric(rs.Fields(2).Value) it returns false...BUT VB Script will allow me to do: Cint(rs.Fields(2).Value) and then it is a number that can be calculated. Very strange...I am new to Oracle and wondering if there is something I am missing. How can a field defined as 'number' be returned otherwise? And how is it that VB Script tells me it is not a number, but then goes ahead and converts it to an integer without throwing a type mismatch? Thanks much.
Click Here to Expand Forum to Full Width
This is a CodeGuru survey question.