Returns the user-defined data type for a regular result column.
DBINT dbcolutype (
PDBPROCESS dbproc,
INT column );
The column parameter’s user-defined data type on success and -1 on error.
This function is defined as data type DBINT to accommodate the size of user-defined data types. Both DBINT and user-defined data types are 32 bits long. Call dbcolutype after dbresults returns SUCCEED.
This example shows how to use dbcolutype:
DBPROCESS *dbproc;
int colnum;
int numcols;
// Put the command into the command buffer.
dbcmd (dbproc, "SELECT * FROM mytable");
// Send the command to the SQL Server and begin execution.
dbsqlexec(dbproc);
// Process the command results.
dbresults(dbproc);
// Examine the user-defined column types.
numcols = dbnumcols(dbproc);
for (colnum = 1; colnum < numcols; colnum++)
{
printf
("column %d, user-defined type is %ld.\n",
colnum, dbcolutype(dbproc, colnum));
}
dbaltutype | dbcoltype |