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

  1. .Na "bcp_sendrow"
  2. .mc |
  3. .Aa
  4. .Fu
  5. Send a row of data from program variables to \*S.
  6. .Ih "bcp, send data from program variables to \*S"
  7. .Sy
  8. .Sf "RETCODE bcp_sendrow(dbproc)"
  9. .Sp "DBPROCESS" "*dbproc"
  10. .Co
  11. .Bl
  12. \f2bcp_sendrow()\f1 builds a row from program variables and sends it
  13. to \*S.
  14. .Bl
  15. Before calling \f2bcp_sendrow()\f1, you must make calls to
  16. \f2bcp_bind()\f1 to specify the program variables to be used.
  17. .Bl
  18. If \f2bcp_bind()\f1 is called with a \f2type\f1 parameter of SYBTEXT or SYBIMAGE
  19. and a non-NULL \f2varaddr\f1 parameter, \f2bcp_sendrow()\f1 will send
  20. the entire text or image data value, just as it does for all other
  21. datatypes.
  22. If, however, \f2bcp_bind()\f1 has a NULL \f2varaddr\f1 parameter,
  23. \f2bcp_sendrow()\f1 will return control to the application immediately
  24. after all non-text or image columns are sent to \*S.
  25. The application can then call
  26. \f2bcp_moretext()\f1 repeatedly to send the text and image columns to \*S,
  27. a chunk at a time.
  28. For an example, see the \f2bcp_moretext()\f1 manual page.
  29. .Bl
  30. After the last call to \f2bcp_sendrow()\f1, you must call
  31. \f2bcp_done()\f1 to ensure proper internal cleanup.
  32. .Bl
  33. When \f2bcp_sendrow()\f1 is used to bulk copy rows from program variables
  34. into \*S tables, rows are permanently saved in \*S
  35. only when the user calls \f2bcp_batch()\f1 or \f2bcp_done()\f1.
  36. .sp 0.5v
  37. The user may choose to call \f2bcp_batch()\f1 once every \f2n\f1 rows, or when
  38. there is a lull between periods of incoming data (as in a telemetry
  39. application). Of course, the user may choose some other criteria
  40. or may decide not to call \f2bcp_batch()\f1 at all. If \f2bcp_batch()\f1 is never
  41. called, the rows are permanently saved in \*S when
  42. \f2bcp_done()\f1 is called.
  43. .Bl
  44. For information on the \f2bcp\f1 utility program, see its manual page
  45. in the \f2Commands Reference\f1.
  46. .Bz
  47. .Pa
  48. .Pi dbproc
  49. A pointer to the DBPROCESS structure that provides the connection
  50. for a particular front-end/\*S process.  It contains all the
  51. information that \*L uses to manage communications and data between the
  52. front end and \*S.
  53. .in -.375i
  54. .Re
  55. .br
  56. SUCCEED or FAIL.
  57. .Sa
  58. bcp_batch,
  59. bcp_bind,
  60. bcp_colfmt,
  61. bcp_collen,
  62. bcp_colptr,
  63. bcp_columns,
  64. bcp_control,
  65. bcp_done,
  66. bcp_exec,
  67. bcp_init,
  68. bcp_moretext
  69. .mc
  70.