Sequence.nextval numeric type in Oracle 10g differs from Oracle 8i when using MS OleDb provider

A

alasdair.johnson

A bug I noticed which doesn't seem to be posted on usenet, nor
recognized by Oracle (who didn't want to help unless we had been using
their ADO.NET provider...):

We used to retrieve the sequence id, mysequence.nextval, into ADO.NET.
This was returned as a decimal and so we cast it directly to a
decimal. However, when we upgraded the Oracle database to 10g, the
code broke because the value thus returned was then a double
(which .NET can't seem to cast to a decimal - go figure). We were
using Microsoft's generic OleDb provider to access the Oracle
databases (Provider=MSDAORA.1).

The fix, it turns out, is to use the Oracle OleDb provider (Provider =
OraOLEDB.Oracle). This provides a drop-in replacement for the
Microsoft OleDb provider, and thus obviates the need for making
changes to the code (which for us would have been a pain). Hopefully
there are no significant differences otherwise between the two
providers...

I hope this helps someone else who may also come across this problem.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,480
Members
44,900
Latest member
Nell636132

Latest Threads

Top