home *** CD-ROM | disk | FTP | other *** search
- .Na "bcp_collen"
- .mc |
- .Aa
- .Fu
- Set the program variable data length for the current copy IN.
- .Ih "bcp, set the program variable data length"
- .Sy
- .Sf "RETCODE bcp_collen(dbproc, varlen, table_column)"
- .Sp "DBPROCESS" "*dbproc"
- .Sp "DBINT" "varlen"
- .Sp "int" "table_column"
- .Co
- .Bl
- The \f2bcp_collen()\f1 function allows you to change the program variable
- data length for a particular column while running a copy IN via
- calls to \f2bcp_bind().\f1
- .Bl
- Initially, the program variable data length is determined when
- \f2bcp_bind()\f1 is called. If the program variable data length changes
- between calls to \f2bcp_sendrow(),\f1 and no length prefix or terminator
- is being used, you may call \f2bcp_collen()\f1 to reset the length.
- The next call to \f2bcp_sendrow()\f1 will use the length you just set.
- .Bl
- There must be a separate \f2bcp_collen()\f1 call for every column in
- the table whose data length you want to modify.
- .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.
- .Pi varlen
- The length of the program variable, which does \f2not\f1 include
- the length of the length prefix or terminator. Setting \f2varlen\f1
- to 0 signifies that the data is NULL. Setting it to -1 signifies
- that the data is variable-length and that the length will be
- determined by the length prefix or terminator. If
- both a length prefix and a terminator exist,
- \f2bcp\f1 will use the one that results in the shortest amount
- of data being copied.
- .Pi table_column
- The column in the \*S table to which the data will
- be copied. Column numbers start at 1.
- .in -.375i
- .Re
- .br
- SUCCEED or FAIL.
- .Sa
- bcp_bind,
- bcp_colptr,
- bcp_sendrow
- .mc
-