When you read it back in, examine the date for a null value. If it is null set a tmpStrDate (defined as a string) to null, otherwise put the date in this field. Use that string value to feed into your datatset. e.g.
if (reader->IsDBNull(4) == false)
{
tmp_strValidTo = reader->GetDateTime(4).ToShortDateString();
}
else
{
tmp_strValidTo = nullptr;
}
<pre>