I've got a dataset that contains fields of different
types, including dates.

I need to convert the dataset to a string and to do that i
use WriteXML method. The only problem is that after the
conversion all the null values are missing from the
string. With string fields there is no problem cause I
put "" in them but with dates it IS a problem.

So how can a date field be saved when it contains null
value?

Re: Writing null values using WriteXML() by Val

Val
Mon Nov 24 22:24:49 CST 2003

Hi,

It should be like this. Do not mix empty string ("") and NULL. NULL means NO
value, when "" is a value , which does not have any characters. When you
load XML back into DataSet, then if you have empty string in a XML, then
your value will also contain empty string, not NULL

--
Val Mazur
Microsoft MVP
Check Virus Alert, stay updated
http://www.microsoft.com/security/incident/blast.asp


"D" <anonymous@discussions.microsoft.com> wrote in message
news:020201c3b1bc$749e3840$a001280a@phx.gbl...
> I've got a dataset that contains fields of different
> types, including dates.
>
> I need to convert the dataset to a string and to do that i
> use WriteXML method. The only problem is that after the
> conversion all the null values are missing from the
> string. With string fields there is no problem cause I
> put "" in them but with dates it IS a problem.
>
> So how can a date field be saved when it contains null
> value?