Skip to content

Latest commit

 

History

History
46 lines (40 loc) · 1.97 KB

File metadata and controls

46 lines (40 loc) · 1.97 KB
title NULL Handling (SQLXML 4.0) | Microsoft Docs
ms.custom
ms.date 03/17/2017
ms.prod sql-server-2016
ms.reviewer
ms.suite
ms.technology
dbe-xml
ms.tgt_pltfrm
ms.topic reference
helpviewer_keywords
updg:nullvalue attribute
updategrams [SQLXML], null values
nullvalue attribute
null values [SQLXML]
ms.assetid 5e11eebb-d94e-4ce6-a6d0-870225706bc1
caps.latest.revision 23
author douglaslMS
ms.author douglasl
manager jhubbard

NULL Handling (SQLXML 4.0)

XML syntax denotes NULL as an absence. (For example, if an attribute or element value is NULL, that attribute or element is absent from the XML document.) In [!INCLUDEmsCoName] SQLXML, the updg:nullvalue attribute enables specifying NULL for an element or attribute value.

For example, the following updategram ensures that the Title value for a contact with ContactID of 64 is NULL, and then updates the Title value to "Mr." for this contact.

<ROOT xmlns:updg="urn:schemas-microsoft-com:xml-updategram">  
  <updg:sync updg:nullvalue="IsNULL"  >  
    <updg:before>  
       <Person.Contact ContactID="64" Title="IsNULL" />  
    </updg:before>  
    <updg:after>  
       <Person.Contact ContactID="64" Title="Mr." />  
    </updg:after>  
  </updg:sync>  
</ROOT>  

When parameters are passed to an updategram, NULL can be passed as the parameter value. This is done by specifying the nullvalue attribute in the <updg:header> block. For an example, see Passing Parameters to Updategrams (SQLXML 4.0).

See Also

Updategram Security Considerations (SQLXML 4.0)