Protected Sub Button3_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button3.Click
Dim constr As String = "provider=microsoft.jet.OLEDB.4.0;data source=F:\VB作业\student.mdb"
Dim conn As New OleDbConnection()
conn.ConnectionString = constr
Dim sqlstr As String = "Insert into stuInfo(SNO,name,易做图,age,class,grade,专业,address,简介) values( TextBox1.Text,'" & TextBox2.Text & "','" & TextBox3.Text & "','" & TextBox5.Text & "','" & TextBox7.Text & "','" & TextBox8.Text & "','" & TextBox9.Text & "','" & TextBox10.Text & "','" & TextBox11.Text & "')"
Dim cmd As New OleDbCommand()
cmd.CommandText = sqlstr
cmd.Connection = conn
conn.Open()
cmd.ExecuteNonQuery()
conn.Close()
End Sub