Private cn As New ClsConexion(aqui tu cadena de conexion a la base de datos)
Private cmd As New SqlCommand
Private Consulta As String
cmd.Connection = cn.conexion
If cmd.Connection.State = ConnectionState.Closed Then
cmd.Connection.Open()
End If
Consulta = "INSERT INTO tu_tabla(Nombre1, Nombre2)" & _
"VALUES ('" + combobox1.text + "','" + combobox2 + "')"
cmd.CommandText = Consulta
cmd.ExecuteNonQuery()
Esto funciona!ª!!
Suerte !!!
XD |