Wrong datatype returned - possible bug?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have recently experienced a rather strange occurrence in one of my VB.Net
applications. When extracting values from an oracle database (oracle
9.2.0.4.0) some oracle 'NUMBER' variables are returned as decimal as expected
but others are being returned as double. This causes the
datareader.getDecimal(0) method to fail with an invalid cast exception. The
strange thing is that this code works against other databases running
different versions of Oracle. Has anyone seen this before?
 
Note that the MS world and Oracle world sometimes clash. This is normal
across vendors. In addition, Oracle routinely changes its internals, which
changes how software from other manufacturers work with their software. For
this reason, I suggest sticking with ODP.NET (download free from
http://otn.oracle.com).

If this is not possible, consider casting all values as a specific type from
your Oracle procedure.


---

Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************
 
Back
Top