Sends a row of data from program variables to Microsoft® SQL Server™ 2000.
RETCODE bcp_sendrow ( PDBPROCESS dbproc );
Is the DBPROCESS structure that is the handle for a particular workstation or SQL Server process. It contains all the information that DB-Library uses to manage communications and data between the workstation and SQL Server.
SUCCEED or FAIL.
bcp_sendrow builds a row from program variables and sends it to SQL Server.
Before calling bcp_sendrow, you must make calls to bcp_bind to specify the program variables to be used.
If bcp_bind is called with a type parameter of SQLTEXT or SQLIMAGE and a nonnull varaddr parameter, bcp_sendrow sends the entire text or image data value, just as it does for all other data types. If, however, bcp_bind has a null varaddr parameter, bcp_sendrow returns control to the application immediately after all nontext and nonimage 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 bcp_moretext.
After the last call to bcp_sendrow, you must call bcp_done to ensure proper internal cleanup.
When bcp_sendrow is used to bulk copy rows from program variables into SQL Server tables, rows are permanently saved in SQL Server only when the user calls bcp_batch or bcp_done. The user can choose to call bcp_batch once every n rows or when there is a lull between periods of incoming data. Of course, the user can choose some other criteria or 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.