RDBPROD: ORA-01438 Error When Inserting a Floating Point Number into Rdb via OCI (Doc ID 735195.1)

Last updated on JUNE 07, 2017

Applies to:

Oracle SQL/Services for Rdb on OpenVMS - Version 7.2 and later
HP OpenVMS Itanium
HP OpenVMS Alpha



Symptoms

When attempting to insert a floating point value via OCI calls into an Rdb database, the following error may be reported:

ORA-01438: value larger than specified precision allowed for this column


For example, the used code snippets might be:

    double pi = 3.14159265;                          the passed value

        insert into table(col)   values(:d)             the insert

   OCIBind *bindp_ = NULL;                       bind the parameter
   sb2 indOCIHolder_ = 0;
   res = OCIBindByPos(stmtp_, &bindp_,errhp_, 1, &pi, sizeof(pi),SQLT_FLT,
            &indOCIHolder_, 0, 0, 0, 0, OCI_DEFAULT);

Changes

NLS on the client is set to a value which defines "decimal point is , {comma} "

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