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

Discussion in 'ASP .Net' started by alasdair.johnson@gmail.com, Apr 27, 2007.

  1. Guest

    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.
     
    , Apr 27, 2007
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. sloan

    Access Oracle 10g using ASP.NET

    sloan, Mar 10, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    2,279
  2. Replies:
    10
    Views:
    12,160
    steve
    May 15, 2005
  3. Replies:
    3
    Views:
    6,343
  4. rdlauer
    Replies:
    0
    Views:
    328
    rdlauer
    Mar 29, 2007
  5. Bill McCarthy
    Replies:
    3
    Views:
    3,490
    Alexey Smirnov
    Jan 23, 2009
Loading...

Share This Page