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 );

where

dbproc
Is the DBPROCESS structure that is the handle for a particular workstation/ 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, dbreadtext, dbtxtimestamp, dbtxtsnewval, dbwritetext