
la conversion del tipo dbnull en el tipo string no es valida
Publicado por pabnoc (11 intervenciones) el 13/12/2016 09:39:15
ayuda soy nuevito...me tira error de la conversion del tipo dbnull en el tipo string no es valida"" en esta cadena...
no encuentro la falla....GRACIAS !!
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
If ComboBox1.Text = "Clave" Then
str = "update [Sujeto] set [Nombres] = '" & CStr(row.Cells("Nombres").Value) & _
"' , [medidas] = '" & CStr(row.Cells("medidas").Value) & _
"', [peso] = '" & CStr(row.Cells("peso").Value) & _
"', [long] = '" & CStr(row.Cells("long").Value) & _
"', [sup] = '" & CStr(row.Cells("sup").Value) & _
"', [corp] = '" & CStr(row.Cells("corp").Value) & _
"', [kam] = '" & CStr(row.Cells("kam").Value) & _
"', [prom] = '" & CStr(row.Cells("prom").Value) & _
"', [manr] = '" & CStr(row.Cells("manr").Value) & _
"', [bau] = '" & CStr(row.Cells("bau").Value) & _
"', [madd] = '" & CStr(row.Cells("madd").Value) & _
"', [peris] = '" & CStr(row.Cells("peris").Value) & _
"', [fecha] = '" & CStr(row.Cells("fecha").Value) & "' Where [Clave] = '" & TextBox1.Text & "'"
Dim cmd1 As OleDbCommand = New OleDbCommand(str, Conexión1)
Try
cmd1.ExecuteNonQuery()
Catch ex As Exception
MsgBox(ex.Message.ToUpper)
End Try
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
ElseIf ComboBox1.Text = "Nombres" Then
str = "update [Sujeto] set [Clave] = '" & CStr(row.Cells("Clave").Value) & _
"' , [medidas] = '" & CStr(row.Cells("medidas").Value) & _
"', [peso] = '" & CStr(row.Cells("peso").Value) & _
"', [long] = '" & CStr(row.Cells("long").Value) & _
"', [sup] = '" & CStr(row.Cells("sup").Value) & _
"', [corp] = '" & CStr(row.Cells("corp").Value) & _
"', [kam] = '" & CStr(row.Cells("kam").Value) & _
"', [prom] = '" & CStr(row.Cells("prom").Value) & _
"', [manr] = '" & CStr(row.Cells("manr").Value) & _
"', [bau] = '" & CStr(row.Cells("bau").Value) & _
"', [madd] = '" & CStr(row.Cells("madd").Value) & _
"', [peris] = '" & CStr(row.Cells("peris").Value) & _
"', [fecha] = '" & CStr(row.Cells("fecha").Value) & "' Where [Nombres] = '" & TextBox1.Text & "'"
Dim cmd1 As OleDbCommand = New OleDbCommand(str, Conexión1)
Try
cmd1.ExecuteNonQuery()
Catch ex As Exception
MsgBox(ex.Message)
End Try
End If
Conexión1.Close()
no encuentro la falla....GRACIAS !!
Valora esta pregunta


0