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

  1. .Na "dbtxptr" 
  2. .mc |
  3. .Aa
  4. .Fu
  5. Return the value of the text pointer for a column
  6. in the current row.
  7. .Ih "text pointer, determining value of"
  8. .Sy
  9. .Sf "DBBINARY *dbtxptr(dbproc, column)"
  10. .Sp "DBPROCESS" "*dbproc"
  11. .Sp "int" "column"
  12. .br
  13. .Co
  14. .Bl
  15. Every database column row of type SYBTEXT or SYBIMAGE has an associated
  16. text pointer, which uniquely identifies the text or image value.
  17. This text pointer is used by the \f2dbwritetext()\f1 function to update text and image values.
  18. .Bl
  19. It's important that all the rows of the specified text or image column have valid text pointers.
  20. A text or image column row will have a valid text pointer if it contains data.
  21. However,
  22. if the text or image column row contains a null value, its text pointer will be
  23. valid only if the null value was explicitly entered with the UPDATE statement.
  24. .sp 0.5v
  25. Assume a table \f2textnull\f1 with columns \f2key\f1 and \f2x\f1, where \f2x\f1 is 
  26. a text column that permits nulls.
  27. The following statement assigns valid text pointers to the text column's rows:
  28. .in +3n
  29. .SD
  30. update textnull
  31. set x = null
  32. .ED
  33. .in -3n
  34. On the other hand,
  35. the INSERT of a null value into a text column does not provide a valid text pointer.
  36. This is true for an INSERT of an explicit null or an INSERT of an implicit null, 
  37. such as the following:
  38. .in +3n
  39. .SD
  40. insert textnull (key)
  41. values (2)
  42. .ED
  43. .in -3n
  44. When dealing with a null text or image value, be sure to use UPDATE to get a valid text pointer.
  45. .Bl
  46. For an example that uses \f2dbtxptr()\f1, see the \f2dbwritetext()\f1 manual page.
  47. .Bz
  48. .Pa
  49. .Pi dbproc
  50. A pointer to the DBPROCESS structure that provides the connection
  51. for a particular front-end/\*S process.  It contains all the
  52. information that \*L uses to manage communications and data between the
  53. front end and \*S.
  54. .Pi column
  55. The number of the column of interest.
  56. The first column in a table is number 1.
  57. .in -.375i
  58. .Re
  59. .br
  60. A DBBINARY pointer to the text pointer for the column of interest.
  61. This pointer may be NULL.
  62. .Sa
  63. dbtxtimestamp, 
  64. dbwritetext
  65. .mc
  66.