home *** CD-ROM | disk | FTP | other *** search
- .Na "bcp_sendrow"
- .mc |
- .Aa
- .Fu
- Send a row of data from program variables to \*S.
- .Ih "bcp, send data from program variables to \*S"
- .Sy
- .Sf "RETCODE bcp_sendrow(dbproc)"
- .Sp "DBPROCESS" "*dbproc"
- .Co
- .Bl
- \f2bcp_sendrow()\f1 builds a row from program variables and sends it
- to \*S.
- .Bl
- Before calling \f2bcp_sendrow()\f1, you must make calls to
- \f2bcp_bind()\f1 to specify the program variables to be used.
- .Bl
- If \f2bcp_bind()\f1 is called with a \f2type\f1 parameter of SYBTEXT or SYBIMAGE
- and a non-NULL \f2varaddr\f1 parameter, \f2bcp_sendrow()\f1 will send
- the entire text or image data value, just as it does for all other
- datatypes.
- If, however, \f2bcp_bind()\f1 has a NULL \f2varaddr\f1 parameter,
- \f2bcp_sendrow()\f1 will return control to the application immediately
- after all non-text or image columns are sent to \*S.
- The application can then call
- \f2bcp_moretext()\f1 repeatedly to send the text and image columns to \*S,
- a chunk at a time.
- For an example, see the \f2bcp_moretext()\f1 manual page.
- .Bl
- After the last call to \f2bcp_sendrow()\f1, you must call
- \f2bcp_done()\f1 to ensure proper internal cleanup.
- .Bl
- When \f2bcp_sendrow()\f1 is used to bulk copy rows from program variables
- into \*S tables, rows are permanently saved in \*S
- only when the user calls \f2bcp_batch()\f1 or \f2bcp_done()\f1.
- .sp 0.5v
- The user may choose to call \f2bcp_batch()\f1 once every \f2n\f1 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 \f2bcp_batch()\f1 at all. If \f2bcp_batch()\f1 is never
- called, the rows are permanently saved in \*S when
- \f2bcp_done()\f1 is called.
- .Bl
- For information on the \f2bcp\f1 utility program, see its manual page
- in the \f2Commands Reference\f1.
- .Bz
- .Pa
- .Pi dbproc
- A pointer to the DBPROCESS structure that provides the connection
- for a particular front-end/\*S process. It contains all the
- information that \*L uses to manage communications and data between the
- front end and \*S.
- .in -.375i
- .Re
- .br
- SUCCEED or FAIL.
- .Sa
- bcp_batch,
- bcp_bind,
- bcp_colfmt,
- bcp_collen,
- bcp_colptr,
- bcp_columns,
- bcp_control,
- bcp_done,
- bcp_exec,
- bcp_init,
- bcp_moretext
- .mc
-