home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.2 for Intel / NeXTSTEP 3.2 for Intel.iso / NextLibrary / Documentation / Sybase / DBLIB / Section2 / dbdatlen.nr < prev    next >
Encoding:
Text File  |  1993-04-22  |  1.1 KB  |  46 lines

  1. .Na "dbdatlen" 
  2. .Aa
  3. .Fu
  4. Return the length of the data in a regular result column.
  5. .Ih "regular column, length of data in"
  6. .Sy
  7. .Sf "DBINT dbdatlen(dbproc, column)"
  8. .Sp "DBPROCESS" "*dbproc"
  9. .Sp "int" "column"
  10. .Co
  11. .Bl
  12. This routine returns the actual length of the data for a 
  13. regular (\f2i.e.,\f1 non-compute) result column.
  14. .Bl
  15. Use the \f2dbcollen()\f1 routine to determine the maximum possible length for the data.
  16. Use \f2dbdata()\f1 to get a pointer to the data itself.
  17. .Bl
  18. Here's a small program fragment that uses \f2dbdatlen()\fP:
  19. .ta +4n +4n +4n +4n +4n +4n
  20. .SD
  21. .so dbdatlen.ex
  22. .ED
  23. .Bz
  24. .Pa
  25. .Pi dbproc
  26. A pointer to the DBPROCESS structure that provides the connection
  27. for a particular front-end/\*S process.  It contains all the
  28. information that \*L uses to manage communications and data between the
  29. front end and \*S.
  30. .Pi column
  31. The number of the column of interest.  The first column is number 1.
  32. .in -.375i
  33. .Re
  34. .br
  35. The length, in bytes, of the data for the particular column.
  36. If the data has a null value,
  37. \f2dbdatlen()\f1 returns 0.
  38. If the column number is not in range, 
  39. \f2dbdatlen()\f1 returns -1.
  40. .Sa
  41. dbcollen,
  42. dbcolname,
  43. dbcoltype,
  44. dbdata,
  45. dbnumcols
  46.