SqlTxTsNewVal$

Returns the identifier for the new value for a text timestamp after a call to SqlWriteText%.

Syntax

SqlTxTsNewVal$ ( sqlconn% )

where

sqlconn%
Is a SQL Server connection. The value of sqlconn% is returned by SqlOpen%.

Returns

The identifier for the timestamp value for the text or image value modified by a SqlWriteText% operation. This identifier can be an empty string.

Important Do not modify this identifier in any way. Modifying the identifier can cause unpredictable results.

Remarks

Every text or image column has an associated text timestamp that is updated whenever the column's value is changed. The new text timestamp identifier, returned by SqlTxTsNewVal$, can be used 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$.

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

See Also

SqlMoreText%, SqlTxTimeStamp$, SqlTxTsPut%, SqlWriteText%