home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.3 (Developer) / NeXT_Developer-3.3.iso / NextLibrary / Documentation / Sybase / DBLIB / Section3 / bcp_collen.nr < prev    next >
Encoding:
Text File  |  1993-04-22  |  1.9 KB  |  57 lines

  1. .Na "bcp_collen"
  2. .mc |
  3. .Aa
  4. .Fu
  5. Set the program variable data length for the current copy IN.
  6. .Ih "bcp, set the program variable data length"
  7. .Sy
  8. .Sf "RETCODE bcp_collen(dbproc, varlen, table_column)"
  9. .Sp "DBPROCESS" "*dbproc"
  10. .Sp "DBINT" "varlen"
  11. .Sp "int" "table_column"
  12. .Co
  13. .Bl
  14. The \f2bcp_collen()\f1 function allows you to change the program variable
  15. data length for a particular column while running a copy IN via
  16. calls to \f2bcp_bind().\f1
  17. .Bl
  18. Initially, the program variable data length is determined when
  19. \f2bcp_bind()\f1 is called. If the program variable data length changes
  20. between calls to \f2bcp_sendrow(),\f1 and no length prefix or terminator
  21. is being used, you may call \f2bcp_collen()\f1 to reset the length.
  22. The next call to \f2bcp_sendrow()\f1 will use the length you just set.
  23. .Bl
  24. There must be a separate \f2bcp_collen()\f1 call for every column in
  25. the table whose data length you want to modify.
  26. .Bl
  27. For information on the \f2bcp\f1 utility program, see its manual page
  28. in the \f2Commands Reference\f1.
  29. .Bz
  30. .Pa
  31. .Pi dbproc
  32. A pointer to the DBPROCESS structure that provides the connection
  33. for a particular front-end/\*S process.  It contains all the
  34. information that \*L uses to manage communications and data between the
  35. front end and \*S.
  36. .Pi varlen 
  37. The length of the program variable, which does \f2not\f1 include
  38. the length of the length prefix or terminator. Setting \f2varlen\f1
  39. to 0 signifies that the data is NULL. Setting it to -1 signifies
  40. that the data is variable-length and that the length will be
  41. determined by the length prefix or terminator. If 
  42. both a length prefix and a terminator exist,
  43. \f2bcp\f1 will use the one that results in the shortest amount
  44. of data being copied.
  45. .Pi table_column 
  46. The column in the \*S table to which the data will
  47. be copied. Column numbers start at 1.
  48. .in -.375i
  49. .Re
  50. .br
  51. SUCCEED or FAIL.
  52. .Sa
  53. bcp_bind, 
  54. bcp_colptr, 
  55. bcp_sendrow
  56. .mc
  57.