dbtxtsput

Puts the new value of a text timestamp into the specified column of the current row in the DBPROCESS.

Syntax

RETCODE dbtxtsput (
PDBPROCESS
dbproc,
LPCDBBINARY
newtxts,
INT
colnum );

Arguments
dbproc
Is the DBPROCESS structure that is the handle for a particular workstation/ Microsoft® SQL Server™ process. It contains all the information that DB-Library uses to manage communications and data between the workstation and SQL Server.
newtxts
Is a pointer to the new text timestamp value. It is returned by dbtxtsnewval.
colnum
Is the number of the column associated with this text timestamp. Column numbers start at 1.
Returns

SUCCEED or FAIL.

Remarks

Every database column of type SQLTEXT or SQLIMAGE has an associated text timestamp, which is updated whenever the column’s value is changed. Use the text timestamp with dbwritetext to ensure that one user doesn’t inadvertently overwrite another’s modifications to the same value in the database. It is returned to the DBPROCESS when a Transact-SQL SELECT statement is performed on a SQLTEXT or SQLIMAGE column and can be examined by calling dbtxtimestamp. Call dbtxtsput only after dbnextrow or dbgetrow has returned REG_ROW.

After each successful dbwritetext operation (which can include a number of calls to dbmoretext), SQL Server sends the updated text timestamp value back to DB-Library. The dbtxtsnewval function allows the application to get this new timestamp value. The application can then use dbtxtsput to put the new timestamp value in the DBPROCESS row buffer for future access through dbtxtimestamp. This is particularly useful when the application is buffering result rows and does not need the new timestamp immediately.

See Also
dbmoretext dbtxtimestamp
dbreadtext dbwritetext

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.