home *** CD-ROM | disk | FTP | other *** search
-
- 1 Version 4.0 -- 5/1/89 bcp_sendrow
- ______________________________________________________________________
-
- NAME: bcp_sendrow
-
- FUNCTION:
- Send a row of data from program variables to SQL Server.
-
- SYNTAX:
- RETCODE bcp_sendrow(dbproc)
-
- DBPROCESS *dbproc;
-
- COMMENTS:
-
- o bcp_sendrow() builds a row from program variables and sends it
-
-
-
-
-
-
- bcp_sendrow Version 4.0 -- 5/1/89 2
- ______________________________________________________________________
- to SQL Server.
-
- o Before calling bcp_sendrow(), you must make calls to bcp_bind()
- to specify the program variables to be used.
- o If bcp_bind() is called with a type parameter of SYBTEXT or
- SYBIMAGE and a non-NULL varaddr parameter, bcp_sendrow() will
- send the entire text or image data value, just as it does for
- all other datatypes. If, however, bcp_bind() has a NULL
- varaddr parameter, bcp_sendrow() will return control to the
- application immediately after all non-text or image columns are
- sent to SQL Server. The application can then call
- bcp_moretext() repeatedly to send the text and image columns to
- SQL Server, a chunk at a time. For an example, see the
- bcp_moretext() manual page.
-
- o After the last call to bcp_sendrow(), you must call bcp_done()
- to ensure proper internal cleanup.
-
-
-
- 3 Version 4.0 -- 5/1/89 bcp_sendrow
- ______________________________________________________________________
- o When bcp_sendrow() is used to bulk copy rows from program vari-
- ables into SQL Server tables, rows are permanently saved in
- SQL Server only when the user calls bcp_batch() or bcp_done().
-
- The user may choose to call bcp_batch() once every n rows, or
- when there is a lull between periods of incoming data (as in a
- telemetry application). Of course, the user may choose some
- other criteria or may decide not to call bcp_batch() at all. If
- bcp_batch() is never called, the rows are permanently saved in
- SQL Server when bcp_done() is called.
- o For information on the bcp utility program, see its manual page
- in the Commands Reference.
-
- 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
-
-
-
- bcp_sendrow Version 4.0 -- 5/1/89 4
- ______________________________________________________________________
- communications and data between the front end and SQL Server.
-
- RETURNS:
- SUCCEED or FAIL.
-
- SEE ALSO:
- bcp_batch, bcp_bind, bcp_colfmt, bcp_collen, bcp_colptr,
- bcp_columns, bcp_control, bcp_done, bcp_exec, bcp_init,
- bcp_moretext
-
-
-
-
-
-
-
-
-
-
-