How to include columns with null values in Dataset XML

  • Thread starter Thread starter Indra
  • Start date Start date
I

Indra

I am retrieving data from a database using parameterized
SQL queries.

1. When I have no parameters in my query, the DataSet that
is returned does not have the column that had all null
values.

2. When I have parameters in my query, the DataSet that
gets returned has the columns that have all null values.
However, when I do a GetXml() on it, the columns will null
values get eliminated

Note that I am setting the ColumnMappings to
MappingType.Attribute to shorten my XML.

I would like to have the the XML include the columns with
null values. How can I achieve that?

Thanks in advance,
Indra
 
Hello Indra,

This Knowledge Base article will answer your questions.

http://support.microsoft.com/default.aspx?scid=kb;en-us;296393


Hope this helps,


Nosheen M Syed MCSD MCDBA OCP
Web Data
Microsoft Developer Support

This posting is provided "AS IS" with no warranties and confers no rights.

Are you secure? For information about the Microsoft Strategic Technology
Protection Program and to order your FREE Security Tool Kit, please visit
http://www.microsoft.com/security.
 
Back
Top