Associate an indicator variable with a compute-row column.
RETCODE dbanullbind(dbproc, computeid, column, indicator) DBPROCESS *dbproc; int computeid; int column; DBINT *indicator;
A pointer to the DBPROCESS structure that provides the connection for a particular front-end/server process. It contains all the information that DB-Library uses to manage communications and data between the front end and server.
The compute row of interest. A select statement may have multiple compute clauses, each of which returns a separate compute row. The computeid corresponding to the first compute clause in a select is 1.
The number of the column that is to be associated with the indicator variable.
A pointer to the indicator variable.
indicator is just the pointer to the indicator variable. It is the variable itself that is set.
SUCCEED or FAIL.
dbanullbind returns FAIL if either computeid or column is invalid.
dbanullbind associates a compute-row column with an indicator variable. The indicator variable indicates whether a particular compute-row column has been converted and copied to a program variable successfully or unsuccessfully, or whether it is null.
The indicator variable is set when compute rows are processed using dbnextrow. The possible values are:
-1 if the column is NULL.
The full length of the column’s data, in bytes if the column was bound to a program variable using dbaltbind, the binding did not specify any data conversions, and the bound data was truncated because the program variable was too small to hold the column’s data.
0 if the column was bound and copied to a program variable successfully.
Detection of character string truncation is implemented only for CHARBIND and VARYCHARBIND.