Pessoal sabem dizer onde está o erro?
Protected Sub Button2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button2.Click
If txtMaquina.Text <> String.Empty And txtMaquinaIP.Text <> String.Empty And txtColaborador.Text <> String.Empty And txtMAC.Text <> String.Empty Then
Try
oConn.Open()
myInsert = "INSERT INTO maquina" & _
"(nome_maquina) VALUES" & _
"(@nome_maquina)"
oCmd.Parameters.Add(New SqlParameter("@nome_maquina", txtMaquina.Text))
oCmd = New SqlCommand(myInsert, oConn)
oCmd.ExecuteNonQuery()
oConn.Close()
'Response.Redirect("Exibir.aspx")
Catch ex As Exception
lblMsg.Text = ex.Message
End Try
End If
End Sub
Missão Crítica