These routines return information about the current state of the command batch. Several of them return information about the “current” command, that is, the command currently being processed by dbresults.
DBCURCMD – returns the number of the current command in a batch.
dbgetoff – checks for the existence of specified Transact-SQL constructs in the command buffer. This routine is used in conjunction with the DBOFFSET option.
DBMORECMDS – indicates whether there are more commands in the batch.
DBCMDROW – indicates whether the current command is one that can return rows (that is, a select or a stored procedure containing a select).
DBROWS – indicates whether the current command actually did return rows.
DBCOUNT – returns the number of rows affected by a command.
DBNUMORDERS – returns the number of columns specified in a select command’s order by clause.
dbordercol – returns the ID of a column appearing in a select command’s order by clause.