Dim str As String
Dim a As Integer
sqlconn.ConnectionString = ("server=127.0.0.1;uid=sa;pwd=123;database=yyms")
sqlconn.Open()
str = "insert into YH values('" & Me.TextBox3.Text & "','" & Me.TextBox4.Text & "','" & Me.TextBox5.Text & "','" & TextBox6.Text & " ')"
sqlcmd.CommandText = str
sqlcmd.Connection = sqlconn
a = sqlcmd.ExecuteNonQuery()
If a = 1 Then
MsgBox("成功 ")
End If