SqlTxTsPut%

Places the identifier for the new value for a text timestamp into a column of the current row in the row buffer.

Syntax

SqlTxTsPut% ( sqlconn%, newtxts$, column% )

where

sqlconn% ( )
Is a SQL Server connection. The value of sqlconn% is returned by SqlOpen%.
newtxts$ ( )
Is the new text timestamp value, returned by SqlTxTsNewVal$.
column%
Is the number of the column to receive the new text timestamp. Column numbers start at 1.

Returns

SUCCEED (1) or FAIL (0).

Remarks

Every text or image column has an associated text timestamp that is updated whenever the column's value is changed. The text timestamp is useful in conjunction with SqlWriteText% to ensure that two competing users do not inadvertently wipe out each other's modifications in the database. It is returned to the sqlconn% when a Transact-SQL SELECT statement is performed on a SQLTEXT or SQLIMAGE column and can be examined by calling SqlTxTimeStamp$. Call SqlTxtsPut% only after SqlNextRow% or SqlGetRow% has returned regrow.

After each successful SqlWriteText% operation (which can include a number of calls to SqlMoreText%), SQL Server sends the updated text timestamp value back to DB-Library for Visual Basic. SqlTxTsNewVal$ enables the application to get this new timestamp value. The application can then use SqlTxTsPut% to place the new timestamp value in the row buffer for future access through SqlTxTimeStamp$. This is particularly useful when the application does not need the new timestamp immediately because row buffering is turned on.

See Also

SqlMoreText%, SqlTxTimeStamp$ and SqlTxTimeStamp&, SqlTxTsNewVal$, SqlWriteText%