Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Why "Select Sequence.Nextval " doesn't work with Microsoft ODBC for Oracle driver 2.5 ?

Re: Why "Select Sequence.Nextval " doesn't work with Microsoft ODBC for Oracle driver 2.5 ?

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: 11 Dec 2001 02:40:40 -0800
Message-ID: <a20d28ee.0112110240.5129f818@posting.google.com>


"zhao" <zhaohui_at_goconnect.net> wrote in message news:<UchR7.73$D%1.1597_at_nsw.nnrp.telstra.net>...
> Hi
>
> When I user Microsoft ODBC for Oracle driver 2.5 in Oracle 8i and execute
> "Select Sequence.Nextval from dual" statement in CRecordset, it doesn't
> work. But if I choose Oracle in OraHome81 it works quite well. How could I
> fix this problem?
>
> Thanks
>
> Zhao

The 2.5 driver is of course way old (designed for 7.3)

The general solution would be wrap it in a stored procedure and function and have that returning the nextval to the calling program. If you have multiple sequences, you can pass the sequence name as a parameter and process the nextval using a REF cursor.

Hth

Sybrand Bakker
Senior Oracle DBA Received on Tue Dec 11 2001 - 04:40:40 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US