Private Sub Button1_Click (отправитель ByVal как System.Object, ByVal e как System.EventArgs) Обрабатывает Button1.Click
cs = "Provider = Microsoft.ACE.OLEDB.12.0; Источник данных = | DataDirectory | \ coder.accdb"
con = New OleDbConnection (cs)
con.Open ()
cmd = New OleDbCommand ("ВСТАВЬТЕ ИНФОРМАЦИЮ О СТУДЕНТЕ ('" + txtid.Text + "', '" + txtroll.Text + "', '" + txtfname.Text + "', '" + txtlname.Text + "' , '' + txtpclass.Text + "','" + txtpname.Text + "','" + txtmname.Text + "','" + txtfoccupation.Text + "','" + txtmoccupation.Text + "' , '"+ txtaddress.Text +"', '"+ txtcontact.Text +"', '"+ txtlandl.Text +"', '"+ txtpschool.Text +"') ", con)
Dim i As Integer = cmd.ExecuteNonQuery
If (i >= 0) Then
MessageBox.Show("Data saved Successfully", "Success!", MessageBoxButtons.OK, MessageBoxIcon.Information)
Else
MessageBox.Show("Data not saved Successfully", "Unsuccessfull!", MessageBoxButtons.RetryCancel, MessageBoxIcon.Error)
End If
con.Close()
End Sub