private bool IsNull(MetaType mt, ulong length)
{
// null bin and char types have a length of -1 to represent null
if (mt.IsPlp)
{
return (TdsEnums.SQL_PLP_NULL == length);
}
// HOTFIX #50000415: for image/text, 0xFFFF is the length, not representing null
if ((TdsEnums.VARNULL == length) && !mt.IsLong)
{
return true;
}
// other types have a length of 0 to represent null
// long and non-PLP types will always return false because these types are either char or binary
// this is expected since for long and non-plp types isnull is checked based on textptr field and not the length
return ((TdsEnums.FIXEDNULL == length) && !mt.IsCharType && !mt.IsBinType);
}