rs_datarow_for_writetext

Description

Provides an image of the data row associated with a text, unitext, or image column updated with the Transact-SQL writetext command, with the Client-Library function ct_send_data, or with the DB-Library™ functions dbwritetext and dbmoretext.

Examples

Example 1

Executes a stored procedure named capture_datarow, setting the value of @au_id to the value of the au_id column and the value of @copy to the status value for the copy column.

create function string
 blurbs_rep.rs_datarow_for_writetext
 for sqlserver_derived_class
 output rpc
 'execute capture_datarow
   @au_id = ?au_id!new?,
   @copy = ?copy!text_status?'

Usage

Table 4-1: text_status values for text, unitext, and image data

Value

Description

0x0001

The column has a null text pointer. There are no modifications to text, unitext, or image columns.

0x0002

Modifications were made at the primary database, which caused a text pointer allocation. Replication Server executes the rs_textptr_init function to allocate a text pointer.

0x0004

The current data value follows. Replication Server executes the rs_writetext function to modify the text, unitext, or image data at the replicate database.

0x0008

The text, unitext, or image column is not replicated. No commands are required in the replicate database because the data did not change value and the text, unitext, or image column has a replicate_if_changed status.

0x0010

The text, unitext, or image column contains a null value after an operation at the primary database. For example, after a text pointer has been allocated, there may be data values in a text or image column and an application at the primary database sets them to null. Replication Server truncates the text, unitext, or image column in the replicate database by setting the values to null if the text_status is not 0x0008.

See also

rs_get_textptr, rs_textptr_init, rs_writetext