Junior High School Enrollment System: Analyzed, Designed and Coded by
Junior High School Enrollment System: Analyzed, Designed and Coded by
Junior High School Enrollment System: Analyzed, Designed and Coded by
Junior High
school
Enrollment
System
Analyzed,Designed and Coded by
Princess Joy O. Cabrera
Aileen F. Lanzona
December 2017
Language used: Microsoft Visual Studio 2015
SOURCE CODE
Imports System.Data.OleDb
Public Class frmAdd
Dim provider As String
Dim datafile As String
Dim connstring As String
Dim myconnection As OleDbConnection = New OleDbConnection
Dim command As OleDbCommand
Dim str As String
Dim Reader As OleDbDataReader
Private Sub btnSave_Click(sender As Object, e As EventArgs) Handles
btnSave.Click
provider = "provider=microsoft.Ace.OLEDB.12.0;data source="
datafile = "C:\Users\CabreraPJO\Desktop\Aicessy\Dtbase.accdb"
connstring = provider & datafile
myconnection.ConnectionString = connstring
myconnection.Open()
Catch ex As Exception
MsgBox(ex.Message)
myconnection.Close()
End Try
If txtStudID.Text = "" Then
MsgBox("Please enter Student ID No.", vbExclamation & vbOKOnly, "")
txtStudID.Focus()
Exit Sub
End If
If txtregID.Text = "" Then
MsgBox("Please enter Registration ID", vbExclamation & vbOKOnly, "")
txtregID.Focus()
Exit Sub
End If
End Sub
End Sub
End Sub
End Class
TABLE NAME: ENROLLMENT
PRIMARY KEY: Registration ID