srv_setutype

Sets the user-defined datatype for a column in a row.

Syntax

int srv_setutype (
SRV_PROC *
srvproc,
int
column,
DBINT
usertype );

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 to set. The first column is 1.
usertype
Specifies the user-defined datatype code.

Returns

SUCCEED or FAIL. Returns FAIL if the column doesn't exist.

Remarks

A column has two types: its actual datatype and its user-defined datatype code. The user-defined datatype is used by SQL Server to store the actual user-defined datatype of the column (if any), and to store column description information (such as nullability and updatability) for the column. For more information on how a pass-through gateway should set this column information, see the the GATEWAY sample application.

The user-defined datatype is used to return ODBC column description information to the Open Data Services ODBC driver. For more information on how a pass-through gateway should set this ODBC column information, see ODBC Drivers for SQL Server and Open Data Services.

The srv_setutype function can be called any time that column has been defined with srv_describe and before the last row has been sent.

See Also

This entry For information about
srv_describe Describing a result row column