OCIAttrGet Returns Scale 0 Instead Of -127 For SEQUENCE.NEXTVAL (Doc ID 1137913.1)

Last updated on JULY 05, 2017

Applies to:

Oracle Database - Enterprise Edition - Version 11.1.0.6 and later
Information in this document applies to any platform.
***Checked for relevance on 23-Jan-2014***

Symptoms

A call to the OCI API function OCIAttrGet Returns Scale 0 Instead of -127 for a sequence object that returns nextval after upgrade to 11g. i.e SEQUENCE.NEXTVAL

For Example:

err = getOCIError(OCIAttrGet((dvoid*)phColumn,(ub4) OCI_DTYPE_PARAM,(dvoid*)&ociv_scale,(ub4 *)0,(ub4)OCI_ATTR_SCALE,m_dbImp->m_hError));

The return value of the ociv_scale variable is -127 with database version earlier than 11g,  however the return value of ociv_scale variable is 0 (Zero) from an Oracle 11g server and onward.


Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms