dbaltutype

Returns the user-defined datatype for a compute column.

Syntax

DBINT dbaltutype (
PDBPROCESS
dbproc,
INT
computeid,
INT
column );

where

dbproc
Is the DBPROCESS structure that is the handle for a particular workstation/ SQL Server process. It contains all the information that DB-Library uses to manage communications and data between the workstation and SQL Server.
computeid
Is the ID that identifies the COMPUTE clause. A SELECT statement can have multiple COMPUTE clauses, which can have varying numbers of aggregate operators and aggregate targets. The computeid is returned by dbnextrow or dbgetrow.
column
Is the number of the column. The first column is number 1.

Returns

The user-defined datatype of the specified compute column on success and -1 on error.

Remarks

For a description of how to add user-defined datatypes to SQL Server databases or server-library programs, see Microsoft SQL Server Transact-SQL Reference.

This function is defined as type DBINT, because both the DB-Library datatype DBINT and user-defined datatypes are 32 bits long. Call dbaltutype only after dbnextrow or dbgetrow returns a computeid.

See Also

dbalttype, dbcolutype