Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 6

Student marksmanagement Abstract

Introduction vb Ado.net Ms Access Design Screens Code Output

Guide: k.nageswara rao m.tech Hod : ch.sriram kumar m.tech Principal: M.Arojirani M.Tech 1. 2. 3. 4. 5. 6. 7. 8. Departmnet 7794912221 raviteja K.ravi teja M.hari priya R.venkatesh M.raja L.kanaka babu K.venkatesh Solmen raju M.gopaiah 11014-cm-017 11014-cm-030 11014-cm-041 11014-cm-027 11014-cm-024 11014-cm-019 11014-cm-034 11014-cm-027

Main Public Class Main Private Sub btnEdit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnEdit.Click Dim editForm As New Edit() editForm.ShowDialog() End Sub Private Sub btnRead_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnRead.Click Dim readForm As New txtName() readForm.ShowDialog() End Sub End Class

edit

Option Explicit Off Imports System.Data Imports System.Data.OleDb Public Class Edit Private Sub btnSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSave.Click 'Read the values from fields Name = txtName.Text.Trim()

sPIN = txtPIN.Text.Trim() isubject1 = CInt(txtSubject1.Text.Trim()) iSubject2 = CInt(txtSubject2.Text.Trim()) iSubject3 = CInt(txtSubject3.Text.Trim()) iSubject4 = CInt(txtSubject4.Text.Trim()) iSubject5 = CInt(txtSubject5.Text.Trim()) iSubject6 = CInt(txtSubject6.Text.Trim()) sInsertStmt = "INSERT INTO STUDENT (PIN, SNAME, SUBJECT1, SUBJECT2, SUBJECT3, SUBJECT4, SUBJECT5, SUBJECT6) VALUES ('" & sPIN & "','" & Name & "'," & iSubject1 & "," & iSubject2 & "," & iSubject3 & "," & iSubject4 & "," & iSubject5 & "," & iSubject6 & ")" Dim connection As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=Marks.mdb") Try connection.Open() Dim command As New OleDbCommand(sInsertStmt, connection) command.ExecuteNonQuery() Catch ex As Exception Finally connection.Close() End Try End Sub Private Sub Edit_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load End Sub End Class

read

Option Explicit Off Imports System.Data Imports System.Data.OleDb Public Class txtName Private Sub btnGO_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnGO.Click sPIN = txtPIN.Text.Trim() sSelectStmt = "SELECT * FROM STUDENT WHERE PIN='" & sPIN & "'" Dim connection As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=Marks.mdb") Try

connection.Open() Dim command As New OleDbCommand(sSelectStmt, connection) Dim reader As OleDbDataReader reader = command.ExecuteReader() reader.Read() txtsname.Text = CStr(reader.GetValue(reader.GetOrdinal("SNAME"))) txtSubject1.Text = CStr(reader.GetValue(reader.GetOrdinal("SUBJECT1"))) txtSubject2.Text = CStr(reader.GetValue(reader.GetOrdinal("SUBJECT2"))) txtSubject3.Text = CStr(reader.GetValue(reader.GetOrdinal("SUBJECT3"))) txtSubject4.Text = CStr(reader.GetValue(reader.GetOrdinal("SUBJECT4"))) txtSubject5.Text = CStr(reader.GetValue(reader.GetOrdinal("SUBJECT5"))) txtSubject6.Text = CStr(reader.GetValue(reader.GetOrdinal("SUBJECT6"))) Catch ex As Exception Finally connection.Close() End Try

End Sub Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtsname.TextChanged End Sub Private Sub GroupBox1_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GroupBox1.Enter End Sub Private Sub txtSubject1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtSubject1.TextChanged End Sub Private Sub btnCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCancel.Click Me.Close() End Sub Private Sub txtName_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load End Sub End Class

You might also like