Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Why "Select Sequence.Nextval " doesn't work with Microsoft ODBC for Oracle driver 2.5 ?
"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