Ver Mensaje Individual
  #3 (permalink)  
Antiguo 17/02/2011, 06:38
josiasdaniel_
 
Fecha de Ingreso: junio-2010
Ubicación: Maracaibo, Venezuela
Mensajes: 139
Antigüedad: 14 años, 8 meses
Puntos: 0
Respuesta: ¿como insertar fecha nula desde vb.net?

Cita:
Iniciado por peterway19 Ver Mensaje
brother ps me gustaria que te especificaras mas en el error que te manda y si pudes poner el trozo de codigo en que te manda el error te podriamos ayudar valeee

este es el codigo:

Código:
 If txtCodigo.Text <> Nothing And txtRazonSoc.Text <> Nothing _
            And txtRif.Text <> Nothing And txtDireccion.Text <> Nothing Then
            If ChBxActivar.Checked = True Then
                DistribuidorTableAdapter.InsertarNuevo(txtCodigo.Text, txtRazonSoc.Text, txtRif.Text, Now, "", txtDireccion.Text, "A", Now)
            Else
                DistribuidorTableAdapter.InsertarNuevo(txtCodigo.Text, txtRazonSoc.Text, txtRif.Text, Now, "", txtDireccion.Text, "I", Now)
            End If
        Else
            MessageBox.Show("Dejo algún campo vacio", "ATENCIÓN", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
        End If

y este es el select que esta dentro del metodo insertarNuevo:

Código:
INSERT INTO Distribuidor
                         (cod_dist, nomEmpresa, rifEmpresa, fecIniDist, fecFinDis, dirección, estatusD, fecModi)
VALUES        (@cod_dist,@nomEmpresa,@rifEmpresa,@fecIniDist,@fecFinDis,@dirección,@estatusD,@fecModi);
Estoy tratando de insertar el valor nulo en el campo que corresponde a fecFinDis.