Article

NEXTVAL not permitted error executiing the OpenEdge SQL NEXTVAL function

« Go Back

Information

 
Article Number000053858
EnvironmentProduct: OpenEdge,
Version: OpenEdge 10.2A03, 10.2B01, 11.x
OS: All supported platforms
Other: SQL NEXTVAL function
Question/Problem Description
Invoking the OpenEdge SQL NEXTVAL function with READ UNCOMMITTED Transaction Isolation Level generates a run time error.

The OpenEdge SQL NEXTVAL function fails when the Transaction Isolation Level is READ UNCOMMITTED.
 
Steps to Reproduce
Clarifying Information
The OpenEdge SQL NEXTVAL function works in 10.1C when the Transaction Isolation Level is READ UNCOMMITTED.
Error MessageError: NEXTVAL not permitted in the Read Uncommitted isolation level. (15769)
Defect/Enhancement NumberDefect PSC00221892
Cause
This is expected behavior. Updates to the database are not permitted at the Read Uncommitted isolation level. However, NEXTVAL updates a database block as part of the increment of the sequence value.

Defect PSC00221892 allowed the OpenEdge SQL NEXTVAL function to work in 10.1C in READ UNCOMMITTED Transaction Isolation Level.  This defect was fixed in OpenEdge 10.2A03, 10.2B01, and 11.x.

 
Resolution
Do not call the OpenEdge SQL NEXTVAL function when the Transaction Isolation Level is set to READ UNCOMMITTED.  Set the Transaction Isolation Level to at least READ COMMITTED before invoking the OpenEdge SQL NEXTVAL function. If desired, use the WITH (NOLOCK) record locking hint to avoid record locking.
Workaround
Notes
References to Other Documentation:

OpenEdge Data Management: SQL Development, Chapter 8, "Data Control Language and Transaction Behavior > Transactions and Isolation Levels"
OpenEdge Data Management: SQL Reference, Chapter 2, "OpenEdge SQL Functions > NEXTVAL"
OpenEdge Data Management: SQL Reference, Chapter 1, "OpenEdge SQL Statements > SELECT > WITH clause"
Attachment 
Last Modified Date2/2/2015 8:16 PM
Disclaimer

The origins of the information on this site may be internal or external to Progress Software Corporation (“Progress”). Progress Software Corporation makes all reasonable efforts to verify this information. However, the information provided is for your information only. Progress Software Corporation makes no explicit or implied claims to the validity of this information.

Any sample code provided on this site is not supported under any Progress support program or service. The sample code is provided on an "AS IS" basis. Progress makes no warranties, express or implied, and disclaims all implied warranties including, without limitation, the implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or performance of the sample code is borne by the user. In no event shall Progress, its employees, or anyone else involved in the creation, production, or delivery of the code be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the sample code, even if Progress has been advised of the possibility of such damages.



Feedback
 
Was this article helpful?

   

Your feedback is appreciated.

Please tell us how we can make this article more useful. Please provide us a way to contact you, should we need clarification on the feedback provided or if you need further assistance.

Characters Remaining: 1025