_sequence jumps by total record count through odbc .newval

freak

Member
We are accessing progress 9.1d through php and Merant 3.6 odbc on windows xp 32bit. We are trying to get the next-value sequence. Each time we execute something like...
Code:
SELECT pub.orderheadseq.currval FROM PUB.orderhead

...the nextval get incremented by the total of all records. Like it is executing nextval for each record which in our case is rougly 300,000 times. Are we doing something wrong with the select statement?
 

durkadurka

New Member
TRICK IS NEXTVAL ACUALLY RUN FOR NUMBER OF RECORDS RETURNED IN "FROM". YOU CAN TRY

Code:
[LEFT][COLOR=#333333]SELECT TOP 1 pub.orderheadseq.nextval FROM PUB.orderhead[/COLOR][/LEFT]

OR EBEN BETTER

Code:
SELECT pub.orderheadseq.nextval FROM SYSPROGRESS.SYSCALCTABLE

CUZ THAT TABLE IS SMALL AND HAVE ONLY 1 RECORD!!
 

durkadurka

New Member
AND I ASSUME THAT U TRIDE ALSO

Code:
SELECT pub.orderheadseq.nextval FROM SYSPROGRESS.SYSCALCTABLE

MY MAIN MAN???
 

Cringer

ProgressTalk.com Moderator
Staff member
What I think Stefan is trying to imply, subtly, is that you really should be upgrading. All of Progress v9 is out of date and unsupported. You should be going to v10 or 11 as soon as possible. If you can compile the source then it's an easy step. If you can't then you should be putting pressure on your vendor.
 

Stefan

Well-Known Member
Indeed, my remark was simply to qualify "top 1 is not supported" to "top 1 is not supported on an unsupported progress version", just in case anyone reads this and gets the wrong idea.
 
Top