dbvarylen

DB Library for C

DB Library for C

dbvarylen

Determines whether the specified data in a regular result column can vary in length.

Syntax

BOOL dbvarylen (
PDBPROCESS
dbproc,
INT
column );

Arguments

dbproc

Is the DBPROCESS structure that is the handle for a particular workstation or Microsoft® SQL Server™ 2000 process. It contains all the information that DB-Library uses to manage communications and data between the workstation and SQL Server.

column

Is the number of the regular result column of interest. The first column is number 1. For further information, see dbadata.

Returns

TRUE or FALSE, indicating whether or not the column's data can vary in length. dbvarylen also returns FALSE if the column number is out of range.

This function returns TRUE if:

  • The result column is derived from a database column of type varchar, varbinary, text, or image.

  • The source database column is defined as NULL, meaning that it may contain a null value.
Remarks

Use dbvarylen especially with programs that handle ad hoc queries and that need to be alerted to possible null data or data of variable length. Call dbvarylen only after dbresults returns SUCCEED.

To get a column's data type, execute dbcoltype.

See Also

dbcollen

dbdatlen

dbcolname

DB-Library for C Data Types

dbcoltype

dbnumcols

dbdata

dbprtype