Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ () — Sybase DB Library C 4.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

  1                       Version 4.0 -- 5/1/89             dbtxtsnewval
  ______________________________________________________________________

  NAME:  dbtxtsnewval

  FUNCTION:
       Return the new value of a text timestamp after a call  to  dbwri-
       tetext().

  SYNTAX:
       DBBINARY *dbtxtsnewval(dbproc)

       DBPROCESS *dbproc;

  COMMENTS:







  dbtxtsnewval            Version 4.0 -- 5/1/89                        2
  ______________________________________________________________________

       o Every database column of type SYBTEXT or SYBIMAGE has an  asso-
         ciated  text  timestamp, which is updated whenever the column's
         value is changed.  The text timestamp is useful in  conjunction
         with  the  dbwritetext() function, to ensure that two competing
         application users do not inadvertently wipe  out  each  other's
         modifications  to  the  same  value  in  the  database.   It is
         returned to the DBPROCESS when a Transact-SQL  SELECT  is  per-
         formed  on  a SYBTEXT or SYBIMAGE column and may be examined by
         calling dbtxtimestamp().
       o After  each  successful  dbwritetext()  operation  (which   may
         include  a  number  of  calls to dbmoretext()), SQL Server will
         send the updated  text  timestamp  value  back  to  DB-Library.
         dbtxtsnewval()  provides  a way for the application to get this
         new timestamp value.

       o The application can use dbtxtsnewval() in two ways.  First, the
         return  from  dbtxtsnewval()  can  be  used  as  the  timestamp


  3                       Version 4.0 -- 5/1/89             dbtxtsnewval
  ______________________________________________________________________
         parameter of a dbwritetext() call.  Second, dbtxtsnewval()  and
         dbtxtsput() can be used together to put the new timestamp value
         into the DBPROCESS row buffer, for future access via dbtxtimes-
         tamp().   This  is  particularly useful when the application is
         buffering result rows and  does  not  need  the  new  timestamp
         immediately.

  PARAMETERS:
       dbproc -  A pointer to the DBPROCESS structure that provides  the
           connection for a particular front-end/SQL Server process.  It
           contains all the information that DB-Library uses  to  manage
           communications and data between the front end and SQL Server.

  RETURNS:
       A pointer to the new text timestamp  value  for  the  SYBTEXT  or
       SYBIMAGE  value  modified  by  a  dbwritetext()  operation.  This
       pointer may be NULL.



  dbtxtsnewval            Version 4.0 -- 5/1/89                        4
  ______________________________________________________________________

  SEE ALSO:
       dbmoretext, dbtxtimestamp, dbtxtsput, dbwritetext
















Typewritten Software • bear@typewritten.org • Edmonds, WA 98026