...should have used ADO.NET ?

Using OleDb to use the raw database drivers from .NET.
However, this is all wrapped COM calls underneath.
So might have been better to use ADO.NET ...


IDataParameter

To check if an output IDataParameter parameter is null, we compare the type of the value object, to the type of DbNull:

if (dbPdt.DbType==DbType.DateTime)
{
if(dbPdt.Value != null && dbPdt.Value.GetType() != typeof(DBNull))
{
pdtOfEodMissing = new NullableDateTime((DateTime)dbPdt.Value);
}
else
{
throw new MissingTrsDataException("Missing EOD record not found");
}
}

Comments