On Tue, May 3, 2011 at 7:33 PM, Jason <[email protected]> wrote:
> I have been searching the web but cannot seem to find an answer to
> this question.  I'm hoping that someone here can help me with this...
> Thanks in advance...
>
> I have the following snippet of code:
>
> ---------------------------------------------------------------------------------------
> strCompany = "select * from Company ";
> db2.LoadDataSet(db.GetSqlStringCommand(strCompany), ds, "Company");
> ---------------------------------------------------------------------------------------
>
> The code will create a dataSet for me based on the information in the
> Company table...no problem.  The problem comes from the fact that one
> of the columns in the Company table has no data in it...all of the
> data in this particular column is NULL.
>
> So, when the dataSet is created, this column (i.e.: Address) is
> missing from the dataSet.  When I try to generate an Xml document from
> this dataSet, there is no <Address> element in the Xml.
>
> Is there a way to make this .LoadDataSet (or some other method)
> generate data so that there will be an <Address> element when I go to
> create the Xml file?
>
> What is the best way to do this?
------------------------
foreach (DataRow dr in ds.Tables[0])
{
    dr(Number for Column of address) ="";
}

Now null is no longer a problem.

-- 
Stephen Russell

Unified Health Services
60 Germantown Court
Suite 220
Cordova, TN 38018

Telephone: 888.510.2667

901.246-0159 cell

-- 
You received this message because you are subscribed to the Google
Groups "DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML
Web Services,.NET Remoting" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/dotnetdevelopment?hl=en?hl=en
or visit the group website at http://megasolutions.net

Reply via email to