To set the attribute values of a structured UDT that is defined to be the result of a UDF, follow these steps.
Attribute Represents a LOB | Steps |
---|---|
No |
|
Yes |
|
For details on FNC_SetStructuredAttribute, FNC_SetStructuredAttributeByNdx, FNC_GetStructuredResultLobAttribute, and FNC_GetStructuredResultLobAttributeByNdx, see C Library Functions.
The following code excerpt sets the attribute value of a structured UDT:
void setX( UDT_HANDLE *pointUdt, INTEGER *val, UDT_HANDLE *resultPoint, char sqlstate[6]) { INTEGER x; INTEGER newval; int nullIndicator; int length; /* Set the x attribute of the result point. */ nullIndicator = 0; newval = *val; FNC_SetStructuredAttribute(*resultPoint, "x", &newval, nullIndicator, SIZEOF_INTEGER); ... }