Posts Tagged ‘Oracle’

Oracle Data Provider For .NET – What is Number?

Četrtek, November 7th, 2013

Grrr… Oracle Data Provider for .NET just cost me time, (some) money and above all reputation.

My .NET application was using MS Oracle Data Provider which was OK. Many are not satisfied with it, but I had no particular problems… Until I hit BLOBs.

To be honest BLOBs are not often used in business application, so I didn’t have much knowledge on how to use it in c#. It is quite easy, but MS Oracle data provider is not fond of them.

So I was forced to use ORACLE Data provider for .NET… And – o my god – database is full of NUMBER fields so MS is using OracleType.Number, but Oracle for .NET does not know “numbers” so I was forced to change the source code from OracleType.Number to OracleDbType.Int32 or OracleDbType.Double (or something like that).

And there I made a typical programming error – typo – I one procedure I changed OracleType.Number to OracleDbType.Int32, but it was used as amount field (so double)… 🙁

And all “of the sudden” amounts were rounded to integers. Nobody noticed for 14 days… and then panic – everything is wrong – who is to blame – me – I admit (ashamed)…

BUT: Thanks Oracle, maybe guys from DB team can teach guys from .NET team what are “numbers” in DB terms…