I carry out the following instruction ..
DataRow[] results = m_dtableKardex.Select("IdReferencia = " + l_intIdReferencia + " OR IdReferencia IS NULL" +
" AND IdTamano = " + l_intIdTamano + " OR IdTamano IS NULL" +
" AND IdLamina = " + l_intIdLamina + " OR IdLamina IS NULL" +
" AND IdColorLamina = " + l_intIdColorLamina + " OR IdColorLamina IS NULL" +
" AND IdAcabado = " + l_intIdAcabadoHerraje + " OR IdAcabado IS NULL" +
" AND IdColorRecubrimiento = " + l_intIdColorRecubrimiento + " OR IdColorRecubrimiento IS NULL" +
" AND IdColorSuperficial =" + l_intIdColorSuperficial + " OR IdColorSuperficial IS NULL");
where any of the conditions can be null, but it shows me the following error:
System.NullReferenceException was not controlled Message = Reference to object not set as an instance of an object.
if only I send a valid data so that it shows the result of the DataRow, with the OR IS NULL Would it obviate the other variables ??