Database Error Messages

Release
toggle
  • 23ai
  • 21c
  • 19c
Updated
Jun 24, 2024

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