EXTFNAPIV4_DESCRIBE_PARM_TABLE_NUM_COLUMNS Attribute (Set)

The EXTFNAPIV4_DESCRIBE_PARM_TABLE_NUM_COLUMNS attribute indicates the number of columns in the table. Used in a describe_parameter_set scenario.

Data Type

a_sql_uint32

Description

The number of columns in the table. Only valid for argument 0 and table arguments.

Usage

If the UDF sets this property, the server compares the value with the name of the parameter supplied in the CREATE PROCEDURE statement. If the two values do not match, the server returns an error. This allows the UDF to ensure the CREATE PROCEDURE statement has the same parameter names as the UDF is expecting.

Returns

On success, returns the sizeof(a_sql_uint32).

On failure, returns one of the generic describe_parameter errors or:
  • EXTFNAPIV4_DESCRIBE_BUFFER_SIZE_MISMATCH – set error returned if the describe_buffer is not the size of size of a_sql_uint32.
  • EXTFNAPIV4_DESCRIBE_INVALID_STATE – set error returned if the state is not ANNOTATION.
  • EXTFNAPIV4_DESCRIBE_NON_TABLE_PARAMETER – set error returned if the parameter is not a TABLE parameter.
  • EXTFNAPI4_DESCRIBE_INVALID_ATTRIBUTE_VALUE – set error returned if the UDF tries to reset the number of columns of the specified table.

Query Processing States

Valid in:
  • Annotation state
Related concepts
Query Processing States
Related reference
EXTFNAPIV4_DESCRIBE_PARM_TABLE_NUM_COLUMNS Attribute (Get)