myConnection.ConnectionString = connString
myConnection.Open()
Dim str As String
str = "Insert into connect([jersey],[Fname],[Mname],[Lname]) Values (?,?,?,?)"
Dim cmd As OleDbCommand = New OleDbCommand(str, myConnection)
cmd.Parameters.Add(New OleDbParameter("jersey", CType(TextBox1.Text, String)))
cmd.Parameters.Add(New OleDbParameter("Fname", CType(TextBox2.Text, String)))
cmd.Parameters.Add(New OleDbParameter("Mname", CType(TextBox3.Text, String)))
cmd.Parameters.Add(New OleDbParameter("Lname", CType(TextBox4.Text, String)))
Try
cmd.ExecuteNonQuery()
cmd.Dispose()
myConnection.Close()
TextBox1.Clear()
TextBox2.Clear()
TextBox3.Clear()
TextBox4.Clear()
Catch ex As Exception
MsgBox(ex.Message)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…