Show TOC

rs_insertLocate this document in the navigation structure

Inserts a single row into a table in a replicate database.

Example 1

Replaces the rs_insert function string for the <publishers >table.

alter function string publishers.rs_insert
 for sqlserver_derived_class
 output language
 'insert into publishers (pub_id, pub_name, city,
  values (?pub_id!new?, ?pub_name!new?,
     ?city!new?, ?state!new?)'
  • rs_insert has replication definition scope.

  • Replication Server generates an rs_insert function string for the system-provided function-string classes when you create a replication definition.

  • If you use a user-created base function-string class, create an rs_insert function string for each replication definition.

  • Create or customize an rs_insert function string at the Replication Server where you created the replication definition.

  • The default generated function string for rs_insert, for the <rs_sqlserver_function_class> and <rs_default_function_class> classes for each replication definition, uses the Transact-SQL insert command syntax.

  • Replication Server cannot send <text>, <unitext>, or <image> data to a replicate database in rs_insert, but it can report the status of <text>, <unitext>, or <image> data with the <text_status> modifier. For a description of the <text_status> modifier, see rs_datarow_for_writetext. <text>, <unitext>, or <image> data is sent to the replicate database with rs_get_textptr, rs_textptr_init, and rs_writetext.