Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 2005 > C# 2005
C# 2005 For discussion of Visual C# 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old December 24th, 2008, 01:37 AM
Posts: n/a
Default Missing Node in XML


QueryStr = @"select * from table1 where Column1={0}";
          QueryStr = String.Format(QueryStr, "1");

          DataSet ds = new DataSet();
          ds = objCon.ExecuteSQL(QueryStr, "Table1");
          String XmlStr = ds.GetXml();

The returning XmlStr Contains


Node Column3 is missing
In Table1 Column3 contains NULL value.


Last edited by jomet; December 24th, 2008 at 01:41 AM..
Old December 24th, 2008, 05:50 AM
joefawcett's Avatar
Wrox Author
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts

There's one way of handling this here: http://devlicio.us/blogs/derik_whitt...ll-values.aspx
It depends on why you need the null column to be shown.
Old December 24th, 2008, 06:48 AM
Posts: n/a

Thanks for your answer.

I checked the link. but it is writing to a file.

I want it to be in string, so that i can concatenate several tables and make an xml output which is used as an input for testing another tool.

i solved it by using ISNULL function in query.

if any other methods please let me know?

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to append child node after an node in XML + C# vishnu108mishra XML 5 November 13th, 2007 05:30 AM
unique xml node value northwind XSLT 1 April 12th, 2007 03:26 AM
Missing Node (Node data) pashworth XSLT 3 January 29th, 2007 12:39 PM
merging a node from one XML to another pravind XSLT 3 February 21st, 2006 05:04 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.