home *** CD-ROM | disk | FTP | other *** search
-
- 1 Version 4.0 -- 5/1/89 DBCOUNT
- ______________________________________________________________________
-
- NAME: DBCOUNT
-
- FUNCTION:
- Return the number of rows affected by a Transact-SQL command.
-
- SYNTAX:
- DBINT DBCOUNT(dbproc)
-
- DBPROCESS *dbproc;
-
- COMMENTS:
-
- o Once the results of a command have been processed, you can call
-
-
-
-
-
-
- DBCOUNT Version 4.0 -- 5/1/89 2
- ______________________________________________________________________
- DBCOUNT() to find out how many rows were affected by the com-
- mand. For example, if a SELECT command was sent to SQL Server
- and you have read all the rows by calling dbnextrow() until it
- returned NO_MORE_ROWS, you can call this macro to find out how
- many rows were retrieved.
-
- o If the current command is one that doesn't return rows, (e.g.,
- a DELETE), you can call DBCOUNT() immediately after
- dbresults().
-
- 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.
-
- RETURNS:
- The number of rows affected by the command, or -1. DBCOUNT()
-
-
- 3 Version 4.0 -- 5/1/89 DBCOUNT
- ______________________________________________________________________
- will return -1 if any of the following are true:
-
- o The Transact-SQL command fails for any reason, such as a syntax
- error.
- o The command is one that never affects rows, such as a PRINT
- command.
-
- o The DBNOCOUNT option is on.
-
- SEE ALSO:
- dbnextrow, dbresults, options
-
-
-
-
-
-
-
-
-