dbnullbind
Associates an indicator variable with a regular result row column.
Syntax
RETCODE dbnullbind (
PDBPROCESS dbproc,
INT column,
LPCDBINT indicator );
Arguments
- dbproc
- Is the DBPROCESS structure that is the handle for a particular workstation/ Microsoft® SQL Server™ 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 column to be associated with the indicator variable.
- indicator
- Is a pointer to the indicator variable.
Returns
SUCCEED or FAIL. Returns FAIL if column is invalid.
Remarks
The indicator variable reveals whether a column in a particular regular result row has been converted and copied to a program variable successfully, or whether it is NULL. Call dbnullbind after dbresults has returned SUCCEED, and after calling dbbind for column.
The indicator variable is set when regular result rows are processed through dbnextrow. The possible values include:
- -1 if the column is NULL.
- The full length of column’s data, in bytes, if column was bound to a program variable through dbbind, the binding did not specify any data conversions, and the bound data was truncated because the program variable was too small to hold data for column.
- 0 if column was bound and copied to a program variable successfully.
Note Only CHARBIND and VARYCHARBIND can detect truncation of character strings.
See Also
(c) 1988-98 Microsoft Corporation. All Rights Reserved.