home *** CD-ROM | disk | FTP | other *** search
- .Na "dbtxptr"
- .mc |
- .Aa
- .Fu
- Return the value of the text pointer for a column
- in the current row.
- .Ih "text pointer, determining value of"
- .Sy
- .Sf "DBBINARY *dbtxptr(dbproc, column)"
- .Sp "DBPROCESS" "*dbproc"
- .Sp "int" "column"
- .br
- .Co
- .Bl
- Every database column row of type SYBTEXT or SYBIMAGE has an associated
- text pointer, which uniquely identifies the text or image value.
- This text pointer is used by the \f2dbwritetext()\f1 function to update text and image values.
- .Bl
- It's important that all the rows of the specified text or image column have valid text pointers.
- A text or image column row will have a valid text pointer if it contains data.
- However,
- if the text or image column row contains a null value, its text pointer will be
- valid only if the null value was explicitly entered with the UPDATE statement.
- .sp 0.5v
- Assume a table \f2textnull\f1 with columns \f2key\f1 and \f2x\f1, where \f2x\f1 is
- a text column that permits nulls.
- The following statement assigns valid text pointers to the text column's rows:
- .in +3n
- .SD
- update textnull
- set x = null
- .ED
- .in -3n
- On the other hand,
- the INSERT of a null value into a text column does not provide a valid text pointer.
- This is true for an INSERT of an explicit null or an INSERT of an implicit null,
- such as the following:
- .in +3n
- .SD
- insert textnull (key)
- values (2)
- .ED
- .in -3n
- When dealing with a null text or image value, be sure to use UPDATE to get a valid text pointer.
- .Bl
- For an example that uses \f2dbtxptr()\f1, see the \f2dbwritetext()\f1 manual page.
- .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 column
- The number of the column of interest.
- The first column in a table is number 1.
- .in -.375i
- .Re
- .br
- A DBBINARY pointer to the text pointer for the column of interest.
- This pointer may be NULL.
- .Sa
- dbtxtimestamp,
- dbwritetext
- .mc
-