CERTIFICATE
This is to certify that ISHAN RAJDOR student of the B.E (Information Technology) 5TH semester of Delhi College of Engineering, Delhi has made the project on University Handbook Management System under my guidance. He has successfully completed four weeks of industrial training during the period from 15th December 2011 to 12th January 2012 in Scientific Research Lab of Advance Study Cell, RAC, DRDO. He was professionally diligent and sincere during the period and showed a keen interest in duties assigned to her. I am satisfied with the project he has made and the final project report he has submitted.
ACKNOWLEDGEMENT
The satisfaction that accompanies the successful completion of any task would be incomplete without the mention of people whose ceaseless cooperation made it possible, whose constant guidance and encouragement crowned all efforts with success. I am very grateful to my project guide Mrs. Jyoti Bhalla for the guidance, inspiration and constructive suggestions that helped me in the preparation of this project. I would also like to express my gratitude to Ms. Stuti Gupta and Mr. Kashi Ram whose constant efforts and support enriched this project with its vivid dimensions.
Ishan Rajdor
TABLE OF CONTENT
S NO.
1. 1.1 1.2 1.3 1.4 1.5
Contents
Introduction Preamble Objective Scope Broad Outline of the Project Broad Outline of Software
PAGE NO.
7 7 7 8 9 10
Analysis Feasibility study Risk Analysis Analysis Models Use Case Diagram Entity Relationship Model Data Flow Diagram Database Schema
12 12 13 14 14 20 21 28
3. 3.1 3.2
31 31 32
4. 4.1
36 36
5.
45
ABSTRACT
In todays time when use of technology is influencing every field of life , to make it easy and convenient and one way of doing that is to digitize the information available in hard copy format. Digitization means converting the hard copy format of any text into in editable format and storing it in computer so that easy retrieval of that data can be possible in future or we can say storing data in digital format. The project uses Microsoft Access (component of Microsoft Office) for backend and Microsoft Visual Basic 6.0 for front end. This project meant to upgrade the existing UNIVERSITY HANDBOOK database software in accordance with the Latest version of University handbook and provides new modules to Add, Remove and Update Universities, Course offered by universities and Subjects offered by different courses.
INTRODUCTION
1.1 Preamble:
Since the invention of computers, it has changed the way world works. It is undoubtedly one of the top ten greatest inventions of mankind. Originally designed for defence purposes during World War II, computer has become an indispensable part of our daily lives, and its uses are almost beyond comprehension itself. Present day computers are used to work, to play, to have fun, to shop, to study, to talk and to generally do anything one can think about. Today, everything is developing to make the work easier and faster. This is achieved by the fast processing power of computer systems. Paper work is converting into computer work. Manual work is expressive but it requires time. In this technically progressive world, how good it seems when all the administrative and managerial tasks are implemented so easily and on time. University Handbook Management links to the digitization of the University Handbook. Digitization means converting the hard copy format of any text into in editable format and storing it in computer so that easy retrieval of that data can be possible in future or we can say storing data in digital format. This project will help our organization to meet aims and needs through best use of IT.
1.2 Objective
RAC, the unique Recruitment and Assessment Centre of DRDO was set up on 23 July 1985 after getting exemption from the purview of Union Public Service Commission (UPSC). It is situated at Lucknow Road, Timarpur, Delhi. RAC has undertaken various recruitment programmers to induct about 1000 scientists
each Year in variety of scientific and engineering disciplines relevant to DRDO Laboratories The primary responsibilities of RAC 1. Recruitment of Scientists (Group 'A' Class I Gazetted Post) in DRDO 2. Assessments of Scientists of DRDO for promotion to the next higher grades 3. Selection of candidates for higher study course (ME/ M. Tech/ MSc Engg) under Research & Training Scheme of DRDO and Post Graduate Training scheme of Army, Navy and Air Force The main objective of University Handbook Management to digitize the University Handbook, preparing the data and develop a simplest GUI to interface with this data. So that the fetching of data to obtain the needed information is quite easy & fast.
1.3 Scope
The RAC conducting several recruitment activities for selection of scientists in DRDO. The candidates applied from several different universities & institutions. After the passing the written exam, the qualified candidates called for interview and their documents should needs to be checked & verified. The qualification they obtained from different universities and institution the affiliation of their universities/Institutes from UGC & AICTE checked from the university handbook. The University Handbook Management provides the scope of fetching data from database which is quite easy task now. Digitization of the University Handbook is done through a process. Like scanning of book converting data in editable text and then preparing database from this raw text. Normalizing this data to remove redundancy and maintain the integrity and database dependency of every field.
Interface Allows interaction of the user with the database Provides facility to Add, Remove, Update Universities Provides facility to Add, Remove, Update Courses offered by Universities Provides facility to Add, Remove, Update Subjects offered in different Courses by Universities Database Stores Universities details Data readily available for analysis of Universities, colleges of different Universities, Courses offered by Universities.
10
11
ANALYSIS
2.1 Feasibility Study
The feasibility study assess whether the proposed development is practical in terms of balance of costs and benefits, the technical requirements and the organizations information system objectives. Three types of constraints influence the decision about the appropriate option: 1. Technical constraints: can the proposed project be completed with the technology currently available? The technology to be used for development of this project is VB6.0 package for front end and MS Access as back end. Both are readily available with the organization. 2. Time constraints: can the proposed project be completed in the available time? The time available for development is 1 month. This require us to plan Various phases of the software development life cycle in accordance with the available time. We can use V model (Software Development Model) which allows simultaneous analysis, designing, development with testing. It is a very useful; model of the systems development process. 3. Budgetary constraints: are the necessary finances available? The softwares required for developments of the project are readily available in the organization.
12
13
Assessing the risk The evaluation of the risk is based on three criteria: 1. the probability that the risk will occur 2. the impact that the risk will have 3. the proximity relates to the time period when the risk may occur
Proximity -
3 4
High
Softwares Misuse
Low
Error encountered or unexpected abruption of the program Significant When certain control in the project requires a dependent file missing in the system Tolerable -
Deciding the appropriate actions The risks identified can be reduced, transferred or eliminated by taking mitigation actions and if necessary the project team could decide to take no action or to develop a contingency plan.
14
S. No. 1 2 3 4 5
Risk Confidentiality Issue Technical Risk Database Risk Platform Issue Softwares Misuse
Action Password protected interface (Two-tier protection) Handling the error occurred in the program Password protected Checking the system for dependent files and installing in case not present in the system Accepting the risk No further action other than to monitor it
Proposed plan All the processes described above should continue throughout the life of the project as new risks may be indentified at any time and there may also be secondary risks that results from actions to reduce initial risks. S. No. 1 2. 3 4 Risk Confidentiality Issue Technical Risk Database Risk Platform Issue Planning An appropriate message displayed if an error occurs 1. Looking for dll/ocx files in C:\Windows\System32 folder 2. If files are not found then copy the files from a support folder, in the application folder, to the system folder -
Softwares Misuse
15
Add Course
Add subjects
Update University
Actor
Remove University
Remove Course
Remove Subject 16
Use Case 1: Add University Main succes scenario : 1. software itself provide a unique University ID. 2. Actor (data entry operator) enters the university name and the available fields. 3. Actor (data entry operator) press the ADD button to add University. Exeption scenario: 1. university already exists in the database. Use Case 2: Add Course Main succes scenario : 1. Actor (data entry operator) selects university ,selects course name to be added to be added, selects faculty, enter specialization (if any) and enter the duration of the course. 2. Actor (data entry operator) press ADD button to add course to university. Exeption scenario : 1. Error msg either of university,course or faculty not selected. Use Case 3: Add Subjects Main succes scenario : 1. Actor (data entry operator) selects university, select course, select subject to be added to selected course. 2. Actor (data entry operator) press ADD button to add subject to selected course.
17
Exeption scenario : 1. Error msg either of the university, course , subject not selected.
Use Case 4: Update University Main succes scenario : 1. Actor (data entry operator) selects the university from the combo box. 2 Actor (data entry operator) updates the university information from University Handbook in text boxes. 3. Actor (data entry operator) press UPDATE button to save the changes made in the university. Use Case 5: Remove University Main succes scenario : 1. Actor (data entry operator) selects University to remove from combo box. 2. Actor (data entry operator) press REMOVE button to remove University. Use Case 6: Remove Course Main succes scenario : 1. Actor (data entry operator) selects University, selects Course, select specialization. 2. Actor (data entry operator) press REMOVE button to remove University.
18
Use Case 6: Remove Subjects Main succes scenario : 1. Actor (data entry operator) selects University, selects course, select subject. 2. Actor (data entry operator) press REMOVE button to remove subject from the selected course.
19
Address
Location UNIVERSITY
HAS
Website
Email ID HAS
Course ID
Offers Course s
HAS
Course name
Colleges Faculty
Faculty name
Courses
Specialization Subject ID 20 Duration Offers fields
Comes under
Subjects
LEVEL-1 DFD (Using event partitioning approach) 1. Name (process name) Description Inputs Add new universities to database University name, VC, Reg, Address, Email ID, Website,FAX no.,Telephone no. Message university Added , University added to database ADD University
Output
2. Name (process name) Description Inputs Add new Course to selected University University name, Course name, faculty name , duration, specialization. Message Course Added, Course added to database ADD Courses
Output
21
3. Name (process name) Description Inputs Output add subjects to selected course of a university University name, course name , subject name Message Subject Added, subject added to database ADD Subject
4. Name (process name) Description Inputs Output Update university information according to new handbook Change required fields Message University Updated, changes saved to database UPDATE University
22
5. Name (process name) Description Inputs Output Update course name and specialization University name, course name , specialization, faculty Message course updated, changes saved to database. UPDATE Course
6. Name (process name) Description Inputs Output Update subject name University name, course name, subject name Message subject updated , changes saved to database. UPDATE Subject
23
7. Name (process name) Description Inputs Output Remove University from database University name Message University removed, university removed from database REMOVE University
8. Name (process name) Description Inputs Output Remove course from selected university University name, course name , specialization (if any) Message Course removed, course removed from selected university. REMOVE Course
24
9. Name (process name) Description Inputs Output Remove subject from selected course and university University name, course name, subject name Message subject removed, subject removed from selected course. REMOVE Subject
Level 1 DFD: 1.
User
ADD University
Database
25
2.
User
ADD Course
Database
4.
User
Update University
Database
26
5. Remove Course
User
Database
6.
User
Remove Subject
Database
27
1. UNIVERSITY Attribute Name Univ_id U_name From_p To Page (To_p) Cable STD Code Address Vice chancellor (VC) Registrar (Reg) PBX FAX Email Address Website Address Number Text Number Number Text Number Text Text Text Text Number Text Text Identifies university University Name Shows starting page of University in Handbook Shows ending page of University in Handbook Cable is of University STD Code of University Address of university campus Name of VC of university Name of registrar of university PBX number of University Fax no. of university Email id of university Web address of university Data type Description
28
2. Univ_course Attribute Name Univ_id Course_Id Eligibility Duration Fac_Id Data type Number Number Text Number Number Description Identifies university Identifies Course Specialization of a course Duration of course Identifies Faculty
3. Univ_Location Attribute Name City State Region Text Text Text Data type Description City in which university comes State in which university comes Region of University
4. Subject Attribute Name Sub_ID S_Name Data type Number Text Description Identifies Subject Subject Name
29
5. Sub_Univ_Crs Attribute Name Sub_ID Course_ID Univ_ID Data type Number Number Number Description Identifies Subject Identifies Course Identifies university
30
Testing
Software testing is a critical phase of software quality assurance. Once source code has been generated, software must be tested to uncover and correct maximum possible errors, before delivering. Thus a series of test cases are designed that have a high likelihood of finding errors. 3.1 Testing Methods The methods used for testing are: 1. Static Testing: It can be applied to an application at any time of its development. The idea is that test data is manually worked through the system as documented to see if it produces the expected results. 2. Dynamic Testing: It is divided into various levelsa. Unit Testing It is the very basic testing to be carried out on a piece of software. b. Integration Testing It involves linking a number of components of the system and running them as a whole. To determine whether units communicate properly. c. System Testing The final stage in testing by the development professional. It involves running the system on the infrastructure that will be used when the system is operational. d. User acceptance To see whether the user can operate the system. It should meet their expectation and not just requirement. e. Regression testing Need to take place at each stage of testing. Whenever a fault is found the offending piece of software identified has to be corrected.
31
S no. 1. 2. 3.
Output/ Message Enter University Name University Name Already exist University Added
S no. 1. 2.
Input Data
Output/ Message
University not Selected Aligarh Muslim University, Prof P University Updated K Abdul Azis (VC), Prof V K Abdul Jaleel (Registrar), vcamu.sancharnet.in (Website Address), 36 (From Page), 49 (To Page).
32
S no. 1. 2.
S no. 1. 2. 3.
Input Data Aligarh Muslim University, Aligarh Muslim University, Faculty of Agricultural Science, BSc, hons, 3. Aliah University, BTech
Output/ Message University not selected Course not selected Coursed Added
4.
Course Added
5. Add Subject Page-ADD SUBJECT button S no. 1. 2. 3. 4. Input Data Aligarh Muslim University, Aligarh Muslim University, BTech Aligarh Muslim University, BTech,Civil Engineering Output/ Message University not selected Course not selected Subject not selected Subject Added
33
6. Remove Course Page-REMOVE COURSE button S no. 1. 2. 3. 4. Input Data Algappa University, Algappa University, BTech, Algappa University, BTech, Part time Output/ Message University not selected Course not selected Select specialization Course Removed from University
7. Remove Subject Page-REMOVE SUBJECT button S no 1. 2. 3. 4. Input Data Algappa University Algappa University, BTech, Algappa University, BTech, Electronics & Communication Output/ Message University not selected Course not selected Select Subject Subject Removed
34
Integration Testing : S No 1. Form Main menu Button Action Error/msg ADD, Update, ADD : menu page Remove (Add university, courses, subjects) UPDATE: menu page (Update University, Courses, Subjects) REMOVE: menu page (Remove University, courses, Subjects) ADD ADD ADD UPDATE UPDATE UPDATE REMOVE REMOVE REMOVE University added Course added Subject added University Updated Course Updated Subject Updated University Removed Course Removed Subject Removed University name already exists
2. 3. 3. 4. 5. 6. 7. 8. 9.
Add University Add courses Add Subjects Update University Update Course Update Subject Remove University Remove Course Remove Subject
35
36
37
Update University: 1. Select University from the combo box. 2. There information is displayed in the text boxes, compare it with new details and make required changes. 3. Press UPDATE button to Update University. Remove University: 1. Select University from the combo box. 2. Press REMOVE button to remove university.
38
39
Remove Course: 1. Select University name from the university list. 2. Select Course name from Course offered by selected university list. 3. Select specialization (if any). 4. Press REMOVE button to remove course from university.
Update Course: 1. Select University name from the university list. 2. Select Course name from Course offered by selected university list. 3. Select specialization (if any). 4. Made changes in the specialization ( if required). 5. Press UPDATE button update course.
40
41
Add Subject: 1. Select university name from university list. 2. Select course from course list. 3. Select subject from subject list. 4. Press ADD button to add s8ubject to selected course in selected university.
42
5. Exit image (to exit the software) Click image to Exit software.
6. Back image (to go back to last Page) Click image to go back to previous page.
43
Coding used
Main menu page (Form1)
44
Public con As New Connection Public rs As New Recordset Public qry, fn As String Dim u_id As Integer
Private Sub cmdadd_Click () Dim ae As Integer If Text2.Text = "" Then MsgBox "University Name not Entered", vbOKOnly Form_Load GoTo Line9 End If 'Check for validation of university name If rs.State = adStateOpen Then rs.Close rs.Open "select U_Name from University", con, adOpenStatic
45
While rs.EOF = False If UCase(Text2.Text) <> UCase(rs.Fields(0)) Then rs.MoveNext Else: MsgBox "university already exits", vbOKOnly + vbInformation, "university cannot be added" ae = 1 GoTo Line10 End If Wend If Text12.Text = "" Then Text12.Text = fp Text13.Text = tp End If qry = "insert into University values(" & Text1.Text & ",'" & Text2.Text & "'," & Text12.Text & "," & Text13.Text & ",'" & Text3.Text & "','" & Text4.Text & "','" & Text5.Text & "','" & Text6.Text & "','" & Text7.Text & "','" & Text8.Text & "','" & Text9.Text & "','" & Text10.Text & "','" & Text11.Text & "')" If rs.State = adStateOpen Then rs.Close rs.Open qry, con, adOpenDynamic, adLockOptimistic, adOpenKeyset MsgBox "One Row Added", vbOKOnly + vbInformation, "University Added. "
46
List1.AddItem Text2.Text Line10: Text2.Text = "" Text3.Text = "" Text4.Text = "" Text5.Text = "" Text6.Text = "" Text7.Text = "" Text8.Text = "" Text9.Text = "" Text10.Text = "" Text11.Text = "" Text12.Text = "" Text13.Text = "" If ae = 1 Then Text1.Text = Text1.Text Else Text1.Text = Text1.Text + 1 End If ae = 0 If rs.State = adStateOpen Then rs.Close rs.Open "select Univ_ID from University order by Univ_ID", con, adOpenStatic If rs.EOF = True Then
47
Text1.Text = 1 Else rs.MoveLast Text1.Text = rs!univ_id + 1 End If Line9: 'University not entered Combo1.Clear End Sub
Private Sub cmdupdate_Click() If Text2.Text = "" Then MsgBox "University Name not Entered", vbOKOnly Form_Load GoTo Line10 End If If rs.State = adStateOpen Then rs.Close rs.Open "select * from university where univ_id=" & Text1.Text & "", con, adOpenDynamic, adLockOptimistic rs.Fields("U_name") = Text2.Text rs.Fields("Cable") = Text3.Text
48
rs.Fields("STD_Code") = Text4.Text rs.Fields("Address") = Text5.Text rs.Fields("Vc") = Text6.Text rs.Fields("Reg") = Text7.Text rs.Fields("PBX") = Text8.Text rs.Fields("fax") = Text9.Text rs.Fields("Email") = Text10.Text rs.Fields("Web") = Text11.Text rs.Fields("from_p") = Text12.Text rs.Fields("To_p") = Text13.Text rs.Update MsgBox "your updations are made", vbOKOnly + vbInformation, "University data updated" Line10: Text1.Text = "" Text2.Text = "" Text3.Text = "" Text4.Text = "" Text5.Text = "" Text6.Text = "" Text7.Text = "" Text8.Text = "" Text9.Text = ""
49
Text10.Text = "" Text11.Text = "" Text12.Text = "" Text13.Text = "" Combo1.Text = "" If rs.State = adStateOpen Then rs.Close rs.Open "select Univ_ID from University order by Univ_ID", con, adOpenStatic If rs.EOF = True Then Text1.Text = 1 Else rs.MoveLast Text1.Text = rs!univ_id + 1 End If
End Sub
Private Sub Combo1_Click() exist = 0 If rs.State = adStateOpen Then rs.Close rs.Open "select * from University where U_Name = '" & Combo1.Text & "'", con, adOpenStatic Text1.Text = rs!univ_id
50
Text2.Text = rs!U_name Text3.Text = rs!Cable Text4.Text = rs!STD_Code Text5.Text = rs!Address Text6.Text = rs!VC Text7.Text = rs!Reg Text8.Text = rs!PBX Text9.Text = rs!Fax Text10.Text = rs!Email Text11.Text = rs!Web Text12.Text = rs!From_p Text13.Text = rs!To_p If rs.State = adStateOpen Then rs.Close rs.Open "select univ_id from university where u_name='" & Combo1.Text & "'", con, adOpenStatic u_id = rs!univ_id 'MsgBox U_id, vbOKOnly End Sub
rs.Open "select U_Name from University", con, adOpenStatic While rs.EOF = False Combo1.AddItem rs!U_name rs.MoveNext Wend If rs.State = adStateOpen Then rs.Close rs.Open "select Univ_ID from University order by Univ_ID", con, adOpenStatic If rs.EOF = True Then Text1.Text = 1 Else rs.MoveLast Text1.Text = rs!univ_id + 1 End If End Sub
Private Sub Command2_Click() If Combo1.Text = "" Then MsgBox "university not selected", vbOKOnly + vbInformation, "select university" Form_Load GoTo Line7 End If If rs.State = adStateOpen Then rs.Close
52
rs.Open "delete from university where U_name='" & Combo1.Text & "'", con, adOpenDynamic, adLockOptimistic
If rs.State = adStateOpen Then rs.Close rs.Open "delete from univ_course where univ_id=" & u_id & "", con, adOpenDynamic, adLockOptimistic If rs.State = adStateOpen Then rs.Close rs.Open "delete from sub_univ_crs where univ_id=" & u_id & "", con, adOpenDynamic, adLockOptimistic
MsgBox "University removed", vbOKOnly + vbInformation, "university removed" Form_Load Combo1.Text = "" Line7: 'university not removed Text1.Text = "" Text2.Text = "" Text3.Text = "" Text4.Text = "" Text5.Text = "" Text6.Text = "" Text7.Text = "" Text8.Text = "" Text9.Text = ""
53
Text10.Text = "" Text11.Text = "" Text12.Text = "" Text13.Text = "" Combo1.Text = "" End Sub
Private Sub Form_Load() 'CONNECTION Set con = New Connection con.CursorLocation = adUseClient con.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\Handbook.mdb" ';Persist Security Info=False"
If rs.State = adStateOpen Then rs.Close rs.Open "select U_Name from University", con, adOpenStatic While rs.EOF = False Combo1.AddItem rs!U_name rs.MoveNext Wend
rs.Open "select Univ_ID from University order by Univ_ID", con, adOpenStatic If rs.EOF = True Then Text1.Text = 1 Else rs.MoveLast Text1.Text = rs!univ_id + 1 End If fp = 0 tp = 0
End Sub
55
Private Sub cmdaddc_Click() If Text16.Text <> "" Then If rs.State = adStateOpen Then rs.Close rs.Open "insert into Faculty values(" & Text17.Text & ",'" & Text16.Text & "')", con, adOpenDynamic, adLockOptimistic, adOpenKeyset List3.AddItem Text16.Text fid = Text17.Text Text17.Text = Text17.Text + 1 End If
56
If Text14.Text <> "" Then If rs.State = adStateOpen Then rs.Close rs.Open "insert into Courses values(" & Text15.Text & ",'" & Text14.Text & "')", con, adOpenDynamic, adLockOptimistic, adOpenKeyset List1.AddItem Text14.Text cid = Text15.Text Text15.Text = Text15.Text + 1 End If If List2.Text = "" Then MsgBox "university not selected", vbOKOnly + vbInformation, "university not selected" Form_Load GoTo Line5 ElseIf (List3.Text = "" And Text16.Text = "") Then MsgBox "faculty not selected", vbOKOnly + vbInformation, "faculty not selected" Form_Load GoTo Line5 ElseIf (List1.Text = "" And Text14.Text = "") Then MsgBox "course not selected", vbOKOnly + vbInformation, "course not selected" Form_Load GoTo Line5 End If
57
If rs.State = adStateOpen Then rs.Close rs.Open "insert into Univ_Course values('" & uid & "','" & cid & "','" & Text12.Text & "','" & Text13.Text & "','" & fid & "')", con, adOpenDynamic, adLockOptimistic, adOpenKeyset MsgBox "One row added", vbOKOnly + vbInformation, "Course Updated" Line5: Text12.Text = "" Text13.Text = "" Text16.Text = "" Text14.Text = "" End Sub
Private Sub cmdremove_Click() If List2.Text = "" Then MsgBox "select university", vbOKOnly + vbInformation, "select university" Form_Load GoTo Line6 ElseIf List4.Text = "" Then MsgBox "select course", vbOKOnly + vbInformation, "select university" Form_Load GoTo Line6 'ElseIf List3.Text = "" Then 'MsgBox "select Eligibility criteria", vbOKOnly + vbInformation, "select eligibilty"
58
If Spec = "" Then If rs.State = adStateOpen Then rs.Close rs.Open "delete from univ_course where univ_id=" & u_id & " and course_id=" & coid & "", con, adOpenDynamic, adLockOptimistic, adOpenKeyset If rs.State = adStateOpen Then rs.Close rs.Open "delete from sub_univ_crs where univ_id=" & u_id & " and course_id=" & coid & "", con, adOpenDynamic Else If rs.State = adStateOpen Then rs.Close rs.Open "delete from univ_course where univ_id=" & u_id & " and course_id=" & coid & " and eligibility='" & Spec & "'", con, adOpenDynamic, adLockOptimistic, adOpenKeyset If rs.State = adStateOpen Then rs.Close rs.Open "delete from sub_univ_crs where univ_id=" & u_id & " and course_id=" & coid & "", con, adOpenDynamic End If For i = List5.ListCount - 1 To 0 Step -1 If List5.Selected(i) = True Then
59
For i = List4.ListCount - 1 To 0 Step -1 If List4.Selected(i) = True Then List4.RemoveItem (i) End If Next i
Text1.Text = "" MsgBox "course removed", vbOKOnly + vbInformation, "courses modified" Line6: ' course not removed End Sub
Private Sub Command1_Click() If Spec <> "" Then If rs.State = adStateOpen Then rs.Close rs.Open "update univ_course set eligibility='" & Text2.Text & "' where univ_id=" & u_id & " and course_id=" & coid & " and eligibility='" & Spec & "'", con, adOpenDynamic, adLockOptimistic Else
60
If rs.State = adStateOpen Then rs.Close rs.Open "update univ_course set eligibility='" & Text2.Text & "' where univ_id=" & u_id & " and course_id=" & coid & "", con, adOpenDynamic, adLockOptimistic End If
If rs.State = adStateOpen Then rs.Close rs.Open "update courses set c_name='" & Text1.Text & "' where course_id=" & coid & "", con, adOpenDynamic, adLockOptimistic If rs.State = adStateOpen Then rs.Close rs.Open "update faculty set f_name='" & Text3.Text & "' where fac_id=" & facid & "", con, adOpenDynamic, adLockOptimistic MsgBox "updations are made", vbOKOnly + vbInformation, "course updated" Text1.Text = "" Text2.Text = "" Text3.Text = "" End Sub
Private Sub Form_Load() Set con = New Connection con.CursorLocation = adUseClient con.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\Handbook.mdb" ';Persist Security Info=False"
61
List1.Clear List2.Clear List3.Clear If rs.State = adStateOpen Then rs.Close rs.Open "select U_Name from University order by U_Name", con, adOpenStatic While rs.EOF = False List2.AddItem rs!U_name rs.MoveNext Wend
If rs.State = adStateOpen Then rs.Close rs.Open "select F_Name from Faculty order by F_Name", con, adOpenStatic While rs.EOF = False List3.AddItem rs!f_name rs.MoveNext Wend
If rs.State = adStateOpen Then rs.Close rs.Open "select C_Name from Courses order by C_Name", con, adOpenStatic While rs.EOF = False List1.AddItem rs!c_name rs.MoveNext
62
Wend If rs.State = adStateOpen Then rs.Close rs.Open "select * from Faculty order by fac_id", con, adOpenStatic If rs.EOF = True Then Text17.Text = 1 Else rs.MoveLast Text17.Text = rs!fac_id + 1 End If If rs.State = adStateOpen Then rs.Close rs.Open "select * from Courses order by Course_ID", con, adOpenStatic If rs.EOF = True Then Text15.Text = 1 Else rs.MoveLast Text15.Text = rs!course_id + 1 End If
End Sub
If rs.State = adStateOpen Then rs.Close rs.Open "select Course_ID from Courses where C_Name = '" & List1.Text & "'", con, adOpenStatic cid = rs!course_id End Sub
Private Sub List2_Click() If rs.State = adStateOpen Then rs.Close rs.Open "select Univ_ID from University where U_Name = '" & List2.Text & "'", con, adOpenStatic uid = rs!univ_id
64
List4.Clear If recset.State = adStateOpen Then recset.Close recset.Open "select univ_id from university where u_name= '" & List2.Text & "'", con, adOpenStatic u_id = recset!univ_id If rs.State = adStateOpen Then rs.Close rs.Open "select distinct c_Name from Univ_course,courses where univ_course.univ_id=" & u_id & " and courses.course_id=univ_course.course_id", con, adOpenStatic While rs.EOF = False List4.AddItem rs!c_name rs.MoveNext Wend
End Sub
Private Sub List3_Click() If rs.State = adStateOpen Then rs.Close rs.Open "select Fac_ID from Faculty where F_Name = '" & List3.Text & "'", con, adOpenStatic fid = rs!fac_id End Sub
65
Private Sub List4_Click() If recset.State = adStateOpen Then recset.Close recset.Open "select course_id from courses where c_name= '" & List4.Text & "'", con, adOpenStatic coid = recset!course_id
If rs.State = adStateOpen Then rs.Close rs.Open "select eligibility from univ_course where univ_id=" & u_id & " and course_id=" & coid & "", con, adOpenStatic List5.Clear While rs.EOF = False List5.AddItem rs!eligibility rs.MoveNext Wend
If rs.State = adStateOpen Then rs.Close rs.Open "select distinct f_name from univ_course, faculty where univ_id=" & u_id & " and course_id=" & coid & " and univ_course.fac_id=faculty.fac_id", con, adOpenStatic List6.Clear While rs.EOF = False
66
End Sub
Private Sub List5_Click() Text2.Text = List5.Text Spec = List3.Text If List5.ListCount = 0 Then Spec = "" End If End Sub
67
rs.Open "select Fac_id from faculty where f_name='" & Text3.Text & "'", con, adOpenStatic facid = rs!fac_id End Sub
Dim uid, fid, cid, sid As Integer Dim unv, crs As String Dim subid As Integer Public con As New Connection Public rs As New Recordset Dim recset As New Recordset Public qry, fn As String
Private Sub Command6_Click() If Text19.Text <> "" Then If rs.State = adStateOpen Then rs.Close rs.Open "insert into Subject values(" & Text18.Text & ",'" & Text19.Text & "')", con, adOpenDynamic, adLockOptimistic, adOpenKeyset
68
List4.AddItem Text19.Text Text19.Text = "" sid = Text18.Text Text18.Text = Text18.Text + 1 End If If rs.State = adStateOpen Then rs.Close rs.Open "insert into Sub_Univ_Crs values('" & sid & "','" & crs & "','" & unv & "')", con, adOpenDynamic, adLockOptimistic, adOpenKeyset lblRslt.BackStyle = 1 lblRslt.Caption = " 1 row added successfully." End Sub
Private Sub cmdadds_Click() If Text19.Text <> "" Then If rs.State = adStateOpen Then rs.Close rs.Open "insert into Subject values(" & Text18.Text & ",'" & Text19.Text & "')", con, adOpenDynamic, adLockOptimistic, adOpenKeyset List4.AddItem Text19.Text sid = Text18.Text Text18.Text = Text18.Text + 1 End If If List5.Text = "" Then
69
MsgBox "university not selected", vbOKOnly + vbInformation, " select university" Form_Load GoTo Line5 ElseIf List6.Text = "" Then MsgBox "course not selected", vbOKOnly + vbInformation, " select course" Form_Load GoTo Line5 ElseIf (List4.Text = "" And Text19.Text = "") Then MsgBox "subject not selected", vbOKOnly + vbInformation, "select subject" Form_Load GoTo Line5 End If
If rs.State = adStateOpen Then rs.Close rs.Open "insert into Sub_Univ_Crs values('" & sid & "','" & crs & "','" & unv & "')", con, adOpenDynamic, adLockOptimistic, adOpenKeyset MsgBox "One Row Added", vbOKOnly + vbInformation, "Subjects Updated" Line5: Text19.Text = "" End Sub
MsgBox "select university", vbOKOnly + vbInformation, "select university" Form_Load GoTo Line6 ElseIf List1.Text = "" Then MsgBox "select course", vbOKOnly + vbInformation, "select university" Form_Load GoTo Line6 ElseIf List2.Text = "" Then MsgBox "select subject", vbOKOnly + vbInformation, "select subject" Form_Load GoTo Line6 End If Dim i As Integer If rs.State = adStateOpen Then rs.Close rs.Open "delete from sub_univ_crs where univ_id=" & unv & " and course_id=" & cid & " and sub_id=" & subid & "", con, adOpenDynamic, adLockOptimistic, adOpenKeyset For i = List2.ListCount - 1 To 0 Step -1 If List2.Selected(i) = True Then List2.RemoveItem (i) End If Next i
71
MsgBox "subject removed", vbOKOnly + vbInformation, "subjects updated" Line6: 'subject not removed Text1.Text = "" End Sub
Private Sub Command1_Click() If List5.Text = "" Then MsgBox "select university", vbOKOnly + vbInformation, "select university" Form_Load GoTo Line6 ElseIf List1.Text = "" Then MsgBox "select course", vbOKOnly + vbInformation, "select university" Form_Load GoTo Line6 ElseIf List2.Text = "" Then MsgBox "select subject", vbOKOnly + vbInformation, "select subject" Form_Load GoTo Line6 End If If rs.State = adStateOpen Then rs.Close rs.Open "update subject set s_name='" & Text1.Text & "' where sub_id=" & subid & "", con, adOpenDynamic, adLockOptimistic
72
MsgBox "updations are made", vbOKOnly + vbInformation, "subject updated" Line6: 'subject not removed Text1.Text = "" Form_Load End Sub
Set con = New Connection con.CursorLocation = adUseClient con.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\Handbook.mdb" ';Persist Security Info=False"
List4.Clear If rs.State = adStateOpen Then rs.Close rs.Open "select * from Subject order by S_Name", con, adOpenStatic While rs.EOF = False List4.AddItem rs!S_Name rs.MoveNext Wend
73
List5.Clear If rs.State = adStateOpen Then rs.Close rs.Open "select U_Name from University order by U_Name", con, adOpenStatic While rs.EOF = False List5.AddItem rs!U_name rs.MoveNext Wend List6.Clear If rs.State = adStateOpen Then rs.Close rs.Open "select C_Name from Courses order by C_Name", con, adOpenStatic While rs.EOF = False List6.AddItem rs!c_name rs.MoveNext Wend If rs.State = adStateOpen Then rs.Close rs.Open "select * from Subject order by Sub_ID", con, adOpenStatic If rs.EOF = True Then Text18.Text = 1 Else rs.MoveLast Text18.Text = rs!sub_id + 1 End If
74
End Sub
Private Sub List1_Click() List2.Clear If recset.State = adStateOpen Then recset.Close recset.Open "select course_id from courses where c_name='" & List1.Text & "'", con, adOpenStatic cid = recset!course_id If rs.State = adStateOpen Then rs.Close rs.Open "select s_name from subject, sub_univ_crs where subject.sub_id=sub_univ_crs.sub_id and sub_univ_crs.univ_id=" & unv & " and sub_univ_crs.course_id=" & cid & " ", con, adOpenStatic While rs.EOF = False List2.AddItem rs!S_Name
75
Private Sub List2_Click() If recset.State = adStateOpen Then recset.Close recset.Open "select sub_id from subject where s_name='" & List2.Text & "'", con, adOpenStatic subid = recset!sub_id Text1.Text = List2.Text
End Sub
Private Sub List4_Click() If rs.State = adStateOpen Then rs.Close rs.Open "select Sub_ID from Subject where S_Name = '" & List4.Text & "'", con, adOpenStatic sid = rs!sub_id End Sub
76
rs.Open "select Univ_ID from University where U_Name = '" & List5.Text & "'", con, adOpenStatic unv = rs!univ_id
List1.Clear List2.Clear
If rs.State = adStateOpen Then rs.Close rs.Open "select distinct c_Name from sub_univ_crs, courses where sub_univ_crs.univ_id=" & unv & " And sub_univ_crs.course_id=courses.course_id ", con, adOpenStatic While rs.EOF = False List1.AddItem rs!c_name rs.MoveNext Wend End Sub Private Sub List6_Click() If rs.State = adStateOpen Then rs.Close rs.Open "select Course_ID from Courses where C_Name = '" & List6.Text & "'", con, adOpenStatic crs = rs!course_id End Sub
77
System Requirements
OS MSOffice OCX Files : : : Windows XP/Windows7 2003 / 2007 version MSChrt20.ocx (C:\Windows\System32) MSComCt2.ocx (C:\Windows\System32) MSComCtl.ocx (C:\Windows\System32)
78
1. www.codeguru.com 2. www.devex.com 3. Microsoft Visual Basic Programmers Guide 4. Microsoft Visual Basic Language Reference Manual
79