home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.3 (Developer) / NeXT_Developer-3.3.iso / usr / sybase / doc / dbtsput.man < prev    next >
Encoding:
Text File  |  1993-04-22  |  3.6 KB  |  111 lines

  1.  
  2.   1                       Version 4.0 -- 5/1/89                  dbtsput
  3.   ______________________________________________________________________
  4.  
  5.   NAME:  dbtsput
  6.  
  7.   FUNCTION:
  8.        Put the new value of the timestamp column into the given  table's
  9.        current row in the DBPROCESS.
  10.  
  11.   SYNTAX:
  12.        RETCODE dbtsput(dbproc, newts, newtslen, tabnum, tabname)
  13.  
  14.        DBPROCESS *dbproc;
  15.        DBBINARY  *newts;
  16.        int       newtslen;
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.   dbtsput                 Version 4.0 -- 5/1/89                        2
  25.   ______________________________________________________________________
  26.        int       tabnum;
  27.        char      *tabname;
  28.  
  29.   COMMENTS:
  30.  
  31.        o dbtsput() is one of the DB-Library browse mode  routines.   See
  32.          the Introduction for a detailed discussion of browse mode.
  33.        o dbtsput() manipulates the timestamp column.  The  WHERE  clause
  34.          returned  by  dbqual()  contains a call to the tsequal built-in
  35.          function.  When such a WHERE clause is used in an UPDATE state-
  36.          ment,  the  tsequal  function places a new value in the updated
  37.          row's timestamp column and returns the new timestamp  value  to
  38.          the application (if the update is successful).  If the same row
  39.          is updated a second time, the UPDATE statement's  WHERE  clause
  40.          must use the latest timestamp value.
  41.  
  42.          This routine updates the timestamp in the DBPROCESS for the row
  43.          currently  being  browsed.   Then,  if the application needs to
  44.  
  45.  
  46.   3                       Version 4.0 -- 5/1/89                  dbtsput
  47.   ______________________________________________________________________
  48.          update the row a second time, it can call dbqual() to formulate
  49.          a new WHERE clause that uses the new timestamp.
  50.  
  51.   PARAMETERS:
  52.        dbproc -  A pointer to the DBPROCESS structure that provides  the
  53.            connection for a particular front-end/SQL Server process.  It
  54.            contains all the information that DB-Library uses  to  manage
  55.            communications and data between the front end and SQL Server.
  56.  
  57.            This must be the  DBPROCESS  used  to  perform  the  original
  58.            SELECT query.
  59.        newts -  A pointer to the new timestamp value.  It is returned by
  60.            dbtsnewval().
  61.        newtslen -  The  length  of  the  new  timestamp  value.   It  is
  62.            returned by dbtsnewlen().
  63.        tabnum -  The number of the updated table. Table numbers start at
  64.            1. tabnum must refer to a browsable table.  Use dbtabbrowse()
  65.            to determine whether a table is browsable.
  66.  
  67.  
  68.   dbtsput                 Version 4.0 -- 5/1/89                        4
  69.   ______________________________________________________________________
  70.            If this value is -1, the tabname parameter will  be  used  to
  71.            identify the table.
  72.        tabname -  A pointer to a null-terminated  table  name.   tabname
  73.            must  refer  to  a browsable table.  If this pointer is NULL,
  74.            the tabnum parameter will be used to identify the table.
  75.  
  76.   RETURNS:
  77.        SUCCEED or FAIL.  The following situations will cause  this  rou-
  78.        tine to return FAIL:
  79.  
  80.        o The application tries to update the timestamp of a non-existent
  81.          row.
  82.        o The application tries to update the timestamp using NULL as the
  83.          timestamp value (newts).
  84.  
  85.        o The specified table is non-browsable.
  86.  
  87.  
  88.  
  89.  
  90.   5                       Version 4.0 -- 5/1/89                  dbtsput
  91.   ______________________________________________________________________
  92.  
  93.   SEE ALSO:
  94.        dbcolbrowse, dbcolsource, dbqual, dbtabbrowse, dbtabcount, dbtab-
  95.        name, dbtabsource, dbtsnewlen, dbtsnewval
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.