srv_setcollen

Specifies the current data length in bytes of a variable-length column or a column that allows null values.

Syntax

int srv_setcollen (
SRV_PROC *
srvproc,
int
column,
int
len );

where

srvproc
Is a pointer to the SRV_PROC structure that is the handle for a particular client connection. The structure contains the information that the ODS Library uses to manage communication and data between the Open Data Services server application and the client.
column
Indicates which column the data length is being specified for. The first column is 1.
len
Indicates the length, in bytes, of the column data. A length of 0 means the column data value is NULL.

Returns

SUCCEED or FAIL.

Remarks

Each column of the row must first be defined with srv_describe. The column data length is set by the last call to srv_describe or srv_setcollen. If variable-length data (null-terminated data) changes for a row, srv_setcollen must be used to set it to the new length before calling srv_sendrow. For a column that allows null values, srv_describe must have been called with desttype set to a datatype that allows nulls (like srvintn) and null data is specified by calling srv_setcollen with len set to 0.

Note that when the datatype of the column is variable-length, len is not checked for reasonableness. This function will return fail if called for a fixed-length column.

See Also

This entry For information about
srv_describe Describing a result row column
srv_setcoldata Specifying the current address for a column's data