Re: sequence mystery
Date: 1996/09/24
Message-ID: <527hg5$l5h_at_news.mr.net>#1/1
Vladimir Stavitsky <vlads_at_lvalue.com> wrote:
>Reposting article removed by rogue canceller.
>Hi, everybody;
>what happens here looks very stupid, but i will describe it anyway.
>Under certain circumstances i issue "CREATE SEQUENCE" statement
>from my C++ code to Oracle. Sequences are created fine, and later
>on i use them in the code with no problems.
>At some point, though, when, say, i have 5 sequences created this
>way, and the CurrVal is at some random point for each of them (say
>3, 2, 5, 1, 4), next access to any of them starts from 21 instead
>of the expected NextVal.
>It happened twice already, and it's pretty difficult to test, since
>the whole thing is generated step by step through my GUI.
>Related question i have is wht's the field LAST_NUMBER in SEQ view;
>it is set to 1, 21, 41 and 61 for different sequences i have created.
>Whenever i create sequences, i do not supply any values, expecting
>to get defaults from Oracle.
I ran into this using OCI when the cursor calling the sequence was cancelled, I think. I'll have to check the code to be sure. It could also have been from re-opening a cursor without closing it. If this doesn't fixed your problem, e-mail me and I'll follow up with you. You're not going nuts (I know I thought I was). We did solve this problem, so there is hope.
Russ russ.eberle_at_born.com Received on Tue Sep 24 1996 - 00:00:00 CEST