Estoy intentando guardar datos nulos, pero cuando los mando con la instrucción me los manda vacíos, este es mi código para insertarlos en SQL Server:
public Boolean DetalleLote(int Programa, int Lote, int? T150, int? T155, int? T160, int? T165, int? T170, int? T175, int? T180, int? T185, int? T190, int? T195, int? T200, int? T205, int? T210, int? T215, int? T220, int? T225, int? T230, int? T235, int? T240, int? T245, int? T250, int? T255, int? T260, int? T265, int? T270, int? T275, int? T280, int? T285, int? T290, int? T295, int? T300, int Cantidad)
{
try
{
String query = "INSERT INTO DetalleLote VALUES(" + Programa + ", " + Lote + ", " + T150 + ", " + T155 + ", " + T160 + ", " + T165 + ", " + T170 + ", " + T175 + ", " + T180 + ", " + T185 + ", " + T190 + ", " + T195 + ", " + T200 + ", " + T205 + ", " + T210 + ", " + T215 + ", " + T220 + ", " + T225 + ", " + T230 + ", " + T235 + ", " + T240 + ", " + T245 + ", " + T250 + ", " + T255 + ", " + T260 + ", " + T265 + ", " + T270 + ", " + T275 + ", " + T280 + ", " + T285 + ", " + T290 + ", " + T295 + ", " + T300 + ", " + Cantidad + ")";
daccess.insert(query);
return true;
}
catch(Exception ex)
{
Console.WriteLine(ex.Message);
return false;
}
}
Pero cuando los mando a guardar me manda el siguiente error:
he checado el resultado y me manda los o campos vacíos, como aqui:
pero no los quiero vacíos, los quiero nulos, si me pudieran ayudar a resolver este pequeño problema, por favor