.LoadDataSet does not generate a DataSet Column if no data in column
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.
I have the following snippet of code in C# :
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 (i.e.: Address
) 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开发者_JAVA技巧 to generate an Xml document from this dataSet
, there is no 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?
精彩评论