Additional Restrictions That Apply to ESQL/C

In addition to the previously described restrictions, the following restrictions also apply when you use the collection-expression format with :
  • You cannot specify an untyped COLLECTION as the host-variable data type.
  • You cannot use the format TABLE(?).

    The data type of the underlying collection variable must be determined statically. To counter this restriction, you can explicitly cast the variable to a typed collection data type (SET, MULTISET, or LIST) that the database server recognizes. For example,

    TABLE(CAST(? AS type))
  • You cannot use the format TABLE(:hostvar).

    To counter this restriction, you must explicitly cast the variable to a typed collection data type (SET, MULTISET, or LIST) that the database server recognizes. For example,

    TABLE(CAST(:hostvar AS type))