PRB: Attributes Are Not Generated for Fields That Contain a NULL Value When ADO Recordset Is Persisted in XML (296393)
The information in this article applies to:
- ActiveX Data Objects (ADO) 2.1
- ActiveX Data Objects (ADO) 2.1 SP1
- ActiveX Data Objects (ADO) 2.1 SP2
- ActiveX Data Objects (ADO) 2.5
- ActiveX Data Objects (ADO) 2.6
- Microsoft Visual Basic Enterprise Edition for Windows 5.0
- Microsoft Visual Basic Enterprise Edition for Windows 6.0
- Microsoft Visual Basic Enterprise Edition for Windows 6.0 SP3
- Microsoft Visual Basic Enterprise Edition for Windows 6.0 SP4
- Microsoft Visual Basic Enterprise Edition for Windows 6.0 SP5
- Microsoft Visual Basic Professional Edition for Windows 5.0
- Microsoft Visual Basic Professional Edition for Windows 6.0
- Microsoft SQL Server 2000 (all editions)
- Microsoft SQL Server 7.0
- Microsoft SQL Server 7.0 Service Pack 1
- Microsoft SQL Server 7.0 Service Pack 2
- Microsoft SQL Server 7.0 Service Pack 3
This article was previously published under Q296393 SYMPTOMS When an ADO Recordset object is persisted in XML format, <z:row/> element attributes are not generated for fields in its records
that have a NULL value. This behavior may impact generic Extensible Stylesheet
Language Transformation (XSLT) scripts that are written to transform
ADO-persisted XML to an alternate format. Most likely, you will notice the
impact when the @* XML Path Language (XPath) expression is used to access the
attributes of <z:row/> elements that represent the fields of a record.
This
behavior does not have any negative impact if you only use ADO to re-open and
manipulate the persisted recordset. It also does not have a negative impact on
XSLT scripts that are written for a specific ADO-persisted XML that references
the <z:row/> element attributes using their hard-coded names. The only
negative impact that it may have is on XSLT scripts that use the @* XPath expression to reference the <z:row/> element attributes. Because the attributes to represent the
fields with NULL values are absent, the XSL Transformation output may appear
incorrectly aligned or formatted. CAUSE This behavior is by design. See the "More Information"
section for a detailed explanation. RESOLUTION If the SQL implementation of the target data source
supports an extension such as the T-SQL IsNull function of Microsoft SQL Server, you can use this function to
construct a query that returns an alternate fixed value for a column when a
NULL value is encountered. However, note that this renders a non-updateable recordset.
Modification Type: | Minor | Last Reviewed: | 7/14/2004 |
---|
Keywords: | kbMSXMLnosweep kbprb KB296393 |
---|
|