1 Version 4.0 -- 5/1/89 dbcolname
______________________________________________________________________
NAME: dbcolname
FUNCTION:
Return the name of a regular result column.
SYNTAX:
char *dbcolname(dbproc, column)
DBPROCESS *dbproc;
int column;
COMMENTS:
dbcolname Version 4.0 -- 5/1/89 2
______________________________________________________________________
o This routine returns a pointer to the null-terminated name of a
regular (i.e., non-compute) result column.
o Here's a small program fragment that uses dbcolname():
DBPROCESS *dbproc;
/* put the command into the command buffer */
dbcmd(dbproc, "select name, id, type from sysobjects");
/* send the command to SQL Server and begin execution */
dbsqlexec(dbproc);
/* process the command results */
dbresults(dbproc);
/* examine the column names */
3 Version 4.0 -- 5/1/89 dbcolname
______________________________________________________________________
printf("first column name is %s\n", dbcolname(dbproc, 1));
printf("second column name is %s\n", dbcolname(dbproc, 2));
printf("third column name is %s\n", dbcolname(dbproc, 3));
PARAMETERS:
dbproc - A pointer to the DBPROCESS structure that provides the
connection for a particular front-end/SQL Server process. It
contains all the information that DB-Library uses to manage
communications and data between the front end and SQL Server.
column - The number of the column of interest. The first column
is number 1.
RETURNS:
A char pointer to the null-terminated name of the particular
column. If the column number is not in range, dbcolname()
returns NULL.
dbcolname Version 4.0 -- 5/1/89 4
______________________________________________________________________
SEE ALSO:
dbcollen, dbcoltype, dbdata, dbdatlen, dbnumcols