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

  1. .Na "dbcolbrowse"
  2. .mc |
  3. .Aa
  4. .Fu
  5. Determine whether the source of a regular result column is updatable via the
  6. \*L browse-mode facilities.
  7. .Ih "column, determining whether it is updatable via browse mode"
  8. .Sy
  9. .Sf "DBBOOL dbcolbrowse(dbproc, colnum)"
  10. .Sp "DBPROCESS" "*dbproc"
  11. .Sp "int" "colnum"
  12. .Co
  13. .Bl
  14. \f2dbcolbrowse()\f1 is one of the \*L browse mode routines.
  15. See the Introduction for a detailed discussion of browse mode.
  16. .Bl
  17. \f2dbcolbrowse()\f1 provides a way to determine whether the database column that's the source
  18. of a regular (\f2i.e.,\f1 non-compute)
  19. result column in a \f2select-list\f1 is updatable via the \*L browse-mode facilities.
  20. This routine is useful in examining ad hoc queries.
  21. If the query has been hardcoded into the program, \f2dbcolbrowse()\f1 is obviously unnecessary.
  22. .Bl
  23. To be updatable, a column must be derived from a browsable table (\f2i.e.,\f1 the table
  24. must have a unique index and a timestamp column) and cannot
  25. be the result of a SQL expression.
  26. For example, in the following \f2select-list\f1:
  27. .SD
  28. .in +3n
  29. select title, category=type, wholesale=(price * 0.6) ... for browse
  30. .in -3n
  31. .ED
  32. result columns 1 and 2 (``title'' and ``category'') are updatable, but
  33. column 3 (``wholesale'') is not, because it is the result of an expression.
  34. .Bl
  35. The application can call
  36. \f2dbcolbrowse()\f1 any time after \f2dbresults()\f1.
  37. .Bl
  38. To determine the name of the source column given the name of the result column, use
  39. \f2dbcolsource()\f1.
  40. .Bl
  41. Example 7 in the \f2\*L Reference Supplement\f1 contains a call to \f2dbcolbrowse()\f1.
  42. .Bz
  43. .Pa
  44. .Pi dbproc
  45. A pointer to the DBPROCESS structure that provides the connection
  46. for a particular front-end/\*S process.  It contains all the
  47. information that \*L uses to manage communications and data between the
  48. front end and \*S.
  49. .Pi colnum
  50. The number of the result column of interest. Column numbers start at 1.
  51. .in -.375i
  52. .Re
  53. .br
  54. TRUE or FALSE. 
  55. .Sa
  56. dbcolsource,
  57. dbqual,
  58. dbtabbrowse,
  59. dbtabcount,
  60. dbtabname,
  61. dbtabsource,
  62. dbtsnewlen,
  63. dbtsnewval,
  64. dbtsput
  65. .mc
  66.