Name

xmlsql_update — Performs insert/update/delete operations based on an XML updategram.

Synopsis

xmlsql_update ( in xml_grams XML_Entity ,
  in input_parameters vector ,
  in debug integer );
 

Description

xmlsql_update() supports XML-based insert, update, and delete operations performed on an existing table in the database. See Updategrams basics in the "Web and XML section" for a detailed explanation.

Parameters

xml_grams

Mandatory parameter containing the XML document with gram(s). This can be produced with sequential calls to the xml_tree() and xml_tree_doc() functions.

input_parameters

Optional array or vector of parameter pairs (parameter_name, parameter_value).

debug

The debug parameter takes values 1/0 to enable(1) or disable(0) printing of the SQL statements it generates from the updategrams on the server's standard output. If not specified the default is disabled (0).

Return Values

Zero, if no error is signalled.

Errors

Table 24.134. Errors signalled by xmlsql_update

Error Code Error Text
XP370 xmlsql_update needs an entity as argument
42000 xmlsql_update expects a vector of even length as second argument
SX999 Empty parameters list
SX998 Too many values for query
SX998 No columns specified in updategram