G
Guest
I'm using the Microsoft Enterprise Data Access block to call the stored
procedure. One of the values the stored procedure returns is the stop date.
When the stop date is null, the program crashes. I would like to be able to
test for a null date, and then store the mindate value in the class
property.
I've tried the following, but it still crashes.
if (dbCommandWrapper.GetParameterValue("@StopDt") == null)
{
_StopDt = DateTime.MinValue;
}
else
{
_StopDt = Convert.ToDateTime(dbCommandWrapper.GetParameterValue("@StopDt"));
}
Any ideas?
Thanks,
Vern
procedure. One of the values the stored procedure returns is the stop date.
When the stop date is null, the program crashes. I would like to be able to
test for a null date, and then store the mindate value in the class
property.
I've tried the following, but it still crashes.
if (dbCommandWrapper.GetParameterValue("@StopDt") == null)
{
_StopDt = DateTime.MinValue;
}
else
{
_StopDt = Convert.ToDateTime(dbCommandWrapper.GetParameterValue("@StopDt"));
}
Any ideas?
Thanks,
Vern