Public Sub insert(ByVal cls As clsregistration)
Try
cnn = New ol.OleDbConnection
cnn.ConnectionString = New clsconnection().getcnnstring
cnn.Open()
cmd = New ol.OleDbCommand
cmd.Connection = cnn
cmd.CommandText = "insert into registration_n values(" & _
"" & cls.eno & "," & _
"'" & cls.fname & "'," & _
"'" & cls.lname & "'," & _
"'" & FormatDateTime(cls.addmission_date, DateFormat.ShortDate) & "'," & _
"'" & FormatDateTime(cls.dob, DateFormat.ShortDate) & "'," & _
"'" & cls.religion & "'," & _
"'" & cls.gender & "'," & _
"'" & cls.class1 & "'," & _
"'" & cls.section & "'," & _
"'" & cls.semester & "'," & _
"'" & cls.session & "'," & _
"'" & cls.father_name & "'," & _
"'" & cls.father_occupatio & "'," & _
"'" & cls.address & "'," & _
"" & cls.phno & "," & _
"" & cls.mobile & "," & _
"'" & cls.email & "'," & _
"" & cls.discount & "," & _
"" & cls.adm_fee & "," & _
"" & cls.dev_fee & "," & _
"" & cls.security_fee & "," & _
"'" & cls.dayHostel & "' )"
cmd.ExecuteNonQuery()
MsgBox("Record saved successfully ", MsgBoxStyle.Information)
cnn.Close()
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub