Category Archives: SQL Database Error Messages

SQL-02157: Source or destination lob is invalid

oracle

SQL-02157: Source or destination lob is invalid
Cause: One of the lobs used in the lob append call is invalid or possibly null
Action: Make sure the lobs used in the append call are non-null

Back to previous menu

https://support.oracle.com/

http://www.oracle.com/

SQL-02156: Invalid type for Indicator or Returned Length

oracle

SQL-02156: Invalid type for Indicator or Returned Length
Cause: A host variable associated with the item Indicator or Returned Length must be of type short or s9(4) comp. If value semantics and scalar they may also be gotten into display sign leading separate host variables
Action: Use signed short for indicator, ref indicator and returned length, ref returned length host variables in C. For COBOL use s9(4) comp. for GETs only with non-arrays and you may use display sign leading separate host variables

Back to previous menu

https://support.oracle.com/

http://www.oracle.com/

SQL-02155: Date Time Interval only valid with Dynamic=ANSI

oracle

SQL-02155: Date Time Interval only valid with Dynamic=ANSI
Cause: An attempt to access the datetime interval code or precision was encountered when type_code option not set to ANSI
Action: Use precompiler option type_code=ansi to access the date time interval code or date time interval precision

Back to previous menu

https://support.oracle.com/

http://www.oracle.com/

SQL-02154: Invalid or unset data type for host variable in ANSI Dynamic

oracle

SQL-02154: Invalid or unset data type for host variable in ANSI Dynamic
Cause: An ANSI Dynamic SET statement with item name DATA was encountered with out a valid TYPE having been previously set and option mode=ansi was used
Action: With mode=ansi, you must set the TYPE before setting the DATA. Issue a SET statement with correct item TYPE or, for output issue a DESCRBE to set the item type. Or use mode=oracle which allows the type to default to the type of the bind/define host variable

Back to previous menu

https://support.oracle.com/

http://www.oracle.com/

SQL-02153: Invalid character variable for use in a GET/SET statement

oracle

SQL-02153: Invalid character variable for use in a GET/SET statement 
Cause: An host variable with type other than character, string or varchar was found as an item name (other than DATA item) in an ANSI Dynamic GET or SET descriptor statement
Action: Host variable types for character items (other than the DATA item) in ANSI dynamic GET or SET descriptor statements must not be of type LONG or LONG VARCHAR. Redeclare the variable to be character, string or varchar type

Back to previous menu

https://support.oracle.com/

http://www.oracle.com/

SQL-02152: Invalid numeric variable for use in an array GET/SET statement

oracle

SQL-02152: Invalid numeric variable for use in an array GET/SET statement
Cause: An host variable with type other than int or short for C or S9(4) or S9(9) binary or comp was used for an exact numeric with and array size > 1
Action: Use only int or short for C or S9(4) or S(9) binary or comp for COBOL when supplying an exact numeric in conjunction with the for clause to indicate arrays. Specifically, display sign leading separate is not allowed in this context

Back to previous menu

https://support.oracle.com/

http://www.oracle.com/

SQL-02151: Invalid host variable for exact numeric SET statement item

oracle

SQL-02151: Invalid host variable for exact numeric SET statement item
Cause: An host variable with an invalid type or length was used to get or set an exact numeric item in an ANSI dynamic statement
Action: Make sure your host variable is and int or short for C or for COBOL, S9(4) or S9(9) binary/comp/display sign leading separate

Back to previous menu

https://support.oracle.com/

http://www.oracle.com/

SQL-02150: Encountered zero length in ANSI dynamic SET statement

oracle

SQL-02150: Encountered zero length in ANSI dynamic SET statement
Cause: An invalid length of zero was encountered in an ANSI dynamic statement
Action: Set the length to a non-zero value

Back to previous menu

https://support.oracle.com/

http://www.oracle.com/

SQL-02149: ANSI Dynamic insufficient item descriptor areas

oracle

SQL-02149: ANSI Dynamic insufficient item descriptor areas
Cause: The SQL statement being described contains more output items (or columns) than were allocated in the descriptor
Action: Increase the MAX number of occurrences when allocating the descriptor

Back to previous menu

https://support.oracle.com/

http://www.oracle.com/

SQL-02148: ANSI Dynamic count value out of range

oracle

SQL-02148: ANSI Dynamic count value out of range
Cause: The count in a dynamic GET or SET statement is less than one or greater than MAX given for descriptor allocation
Action: Supply a number for the COUNT clause between 1 and the MAX occurrences supplied when the descriptor was allocated

Back to previous menu

https://support.oracle.com/

http://www.oracle.com/