Project Report

You might also like

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 85

A

PROJECT REPORT
ON

“COMPUTERIZED LIBRARY SYSTEM”


Submitted To
Rashtrasant Tukdoji Maharaj Nagpur University
Nagpur.
In partial fulfillment of the requirement of
The Degree of

“B.Com [Computer Application] Final


Year”

Submitted By
Ms. Pooja Meshram
Ms. Ravita Rahate
Ms. Nikita sontakke
Guided By
Ms. Reena Nimje
Under The Guidance Of H.O.D
Prof. Shri. K. M. Purohit
Department of Computer Science

VMV COMMERCE, JMT ARTS & JJP SCIENCE COLLEGE, NAGPUR.

Session 2017-18
Computerized Library System Page 1
SHRI NAGPUR GUJRATI MANDAL’S

VMV Commerce, JMT Arts & JJP Science College


Wardhaman Nagar, Nagpur - 440008

Certificate
Certificate

This is to certify that Ms. Pooja Meshram, Ms. Ravita Rahate and Ms. Nikita
Sontakke are final year student of B.Com (Computer Application), has successfully
compiled the project titled “COMPUTERIZED LIBRARY SYSTEM”.

They have satisfactory report for the session 2017-2018 in partial fulfillment
of requirement for the degree of B.Com (Computer Application) of RT M Nagpur University,
Nagpur.

H.O.D. Guide
Prof. K. M. Purohit Ms. Reena Nimje
(Dept. of Computer Science)

Internal Examiner External Examiner


Date :

Computerized Library System Page 2


SHRI NAGPUR GUJRATI MANDAL’S
VMV Commerce, JMT Arts & JJP Science College
Wardhaman Nagar, Nagpur - 440008

Certificate
Certificate

This is to certify that the project “COMPUTERIZED LIBRARY SYSTEM”


submitted by Pooja Meshram partial fulfillment of the requirement of “B.Com. [Computer
Application] examination of the RTM Nagpur University, Nagpur.

The original software carried out under the supervision and guidance of Ms.
Reena Nimje and has undergone the requisite duration as prescribed by the RTM Nagpur
University for the project work.

H.O.D. Guide
Prof. K. M. Purohit Ms. Reena Nimje
(Dept. of Computer Science)

Computerized Library System Page 3


SHRI NAGPUR GUJRATI MANDAL’S
VMV Commerce, JMT Arts & JJP Science College
Wardhaman Nagar, Nagpur - 440008

Certificate
Certificate

This is to certify that the project “COMPUTERIZED LIBRARY SYSTEM”


submitted by Ravita Rahate for partial fulfillment of the requirement of “B.Com. [Computer
Application] examination of the Nagpur University ,Nagpur.

The original software carried out under the supervision and guidance of Ms.
Reena Nimje and has undergone the requisite duration as prescribed by the Nagpur
University for the project work.

H.O.D. Guide
Prof. K. M. Purohit Ms. Reena Nimje
(Dept. of Computer Science)

Computerized Library System Page 4


SHRI NAGPUR GUJRATI MANDAL’S

VMV Commerce, JMT Arts & JJP Science College


Wardhaman Nagar, Nagpur - 440008

Certificate
Certificate

This is to certify that the project “COMPUTERIZED LIBRARY SYSTEM”


submitted by Nikita Sontakke for partial fulfillment of the requirement of “B.Com.
[Computer Application] examination of the RTM Nagpur University ,Nagpur.

The original software carried out under the supervision and guidance of Ms.
Reena Nimje and has undergone the requisite duration as prescribed by the RTM Nagpur
University for the project work.

H.O.D. Guide
Prof. K. M. Purohit Ms. Reena Nimje
(Dept. of Computer Science)

SHRI NAGPUR GUJRATI MANDAL’S

Computerized Library System Page 5


VMV Commerce, JMT Arts & JJP Science College
Wardhaman Nagar, Nagpur - 440008

Declaration
Declaration
To,
The Principal,
V.M.V. College,
Wardhaman Nagar,
Nagpur.
Subject: Declaration for the project.

Respected Sir,

We the undersigned, hereby declare that the work entitled


“COMPUTERIZED LIBRARY SYSTEM” developed and submitted by us is our original
work. The system presented herein is developed by us independently and has not been
duplicated from any other source.

We understand that any such duplication is liable to be punished in


any way the University deem fit.

Thanking you

Your's sincerely,

Ms. Pooja Meshram

Ms. Ravita Rahate

Ms. Nikita Sontakke

ACKNOWLEDGEMENT
ACKNOWLEDGEMENT
Computerized Library System Page 6
I sincerely express my great pleasure to present the project I
extend my profound gratitude to Prof. Shri K. M. Purohit, Coordinator of Computer
Science Department for providing us varieties of opportunities and for the impetus
provided by him throughout the course of this project. I would like to thanks to Ms.
Reena Nimje also for giving guidance and constant encouragement.

I am grateful to our department for their consistent co-operation


and support in processing with the project. My sincere thanks to the staff of B.Com
(Computer Application) for providing better facilities.

Thanking You…………

Ms. Pooja Meshram

Ms. Ravita Rahate

Ms. Nikita Sontakke

INDEX
Contents Pg. No.

Computerized Library System Page 7


1. BRIEF REVIEW OF PROJECT
 Introduction*
 Aims and Objective of project*

2. PRELIMINARY SYSTEM ANALYSIS


 Feasibility Study
 Need for New System

3. SYSTEM SPECIFICATION
 Hardware configuration and software specification*
 Choice of languages*

4. DETAILED SYSTEM ANALYSIS


 Data flow diagram*
 Entity relationship model diagram*
 System Flow diagram *

5. SYSTEM DEVELOPMENT
 Data Dictionary*
 Input Screen*
 Source Code
 Output Screens *

6. IMPLEMENTATION
 Software testing & Data implementation*

7. CONCLUSION
 Limitations Of the Project*
 Scope & Future of project*

8. BIBLOGRAPHY

Computerized Library System Page 8


Review Of
Project

Introduction

A Computerized Library System is a project that manages and stores books


information electronically according to students needs. The system helps both students and
library manager to keep a constant track of all the books available in the library. It allows
Computerized Library System Page 9
both the admin and the student to search for the desired book. It becomes necessary for
colleges to keep a continuous check on the books issued and returned and even calculate
fine. This task if carried out manually will be tedious and includes chances of mistakes.
These errors are avoided by allowing the system to keep track of information such as issue
date, last date to return the book and even fine information and thus there is no need to
keep manual track of this information which thereby avoids chances of mistakes.

The main objective of the Computerized Library System is organizing and


managing the library tasks. Library is place where all kind of books are available.
Computerized Library System is developed to automate the task of entering the records of
new book and retrieving the details of book available in the library. This system contains list
of all the books. Using this system user can issue book to the library member, maintain their
records, and can checks how many book are issued and how many books are available in the
library. This system provides separate interface and login for librarian, students and
faculties. Librarian can modify database. Using the library management system, user can
also maintain the late fine of library member who return the issued book after the due date.
In the proposed system, we assume that each member will be having a
identity card which can be used for the library book issue, fine payment etc. Whenever
library member wish to take a book, the book issued by the library authority will be check
both the book details as well as the student details and store it in library database. They can
view the issue and return dates of any book and due they have to pay.

AIMS &OBJECTIVES

Computerized Library System is a term for computer-based system


that manages the catalogue of a library. The main purpose of this system is to manage
library daily operation efficiently. By using Computerized Library System, the operation of
borrowing and managing inventories is paperless. This system provides a user-friendly data
entry with dropdown button menu, list box and checkbox in purpose to make the input

Computerized Library System Page 10


entry easier to understand and use. It is also created to ensure that the library items are
stored properly in order to maintain their security.

This system will store all the books and members information that consist book numbers,
book titles, author names and racks to the system database. It also provides search function
to help students find the book by number of book. Search function will search through the
books database to look for the book and view where the book is situated.

Objectives of Computerized Library System (CLS)

a) To build a system that can receive input and generate automatically output in easy
way and short time.

b) To build a monitoring system that is able to monitor and manage all library
operations efficiently.

c) Give an opportunity to librarians to reduce mistakes that always happen during


manual method.

d) To store properly the library items in order to maintain their security.

e) To enter and preserve details of the various issues and keep a track on their returns.

This system basically has four types of modules that handle daily activities for the library:

a) Manage Account module

b) Search Record Module

c) Book Borrowing System Module

d) Report Generator Module

Computerized Library System Page 11


PRELIMINARY
SYSTEM
ANALYSIS

PRELIMINARY SYSTEM ANALYSIS


 Identification of need:

Identification of needs is generally concerned with the user's requirements and


expectations from the system. Systems can be classified under two categories: Manual and
Computerized. It is obvious that in most cases computerized systems are more capable and
beneficial than manual system due to their faster responses and quick and fast processing
capabilities. Thus in most cases manual systems are concerned with their transformations
into computerized ones. In other cases computerized systems are concerned with more
betterment of their existing system. Whatever may be the reason there must be some

Computerized Library System Page 12


expectation of the users from the new system to be developed. These expectations are from
the identification of needs for the project.

The following are the needs for the development of the proposed system:
 Faster performance of calculations and safe storage of records for later needs.
 Faster Updates and Modifications of the existing records.
 Presentations in ordered and well-structured format.
 Secured storage and retrieval of data.

 Preliminary Investigation (Survey):

Analysis working on the preliminary should accomplish the following objectives:


 Benefits to be provided by the system: Here the system replaces a manual
system of maintenance of member details, book details and monetary
transactions.
 Gathering Information: This deals with the gathering of information of the
way the organizers are maintaining the above said records, their manuals if
present or if they likely to public them for the development of the new
system.
 Getting Knowledge of the project request: This is concerned with user's
expectation from the system to be developed. This is however already
covered in the "Identification of Need” section.
 Rough estimation of the costing for the system: This is concerned with an
outline costing needed to develop the system as a system must not only be
work effective but also must be cost effective to be developed and to be
brought for usage.
 Feasibility of development: Based on all the information gathered the next
step is to find out whether the project is suitable for development, whether
the project could be developed or not under the circumstances planed for its
development.

 Feasibility Study:
Feasibility is the determination of whether or not a project is worth doing.
The process followed in making this determination is called a Feasibility study. This type of
study determines if a project can or should be taken. Once it has been determined that a
project is feasible, the analyst can go ahead and prepare the project specification which
finalizes project requirements.

In the conduct of the feasibility study, the analyst takes into consideration three
important, distinct but inter-related types of feasibility. They are:
1. Economic Feasibility.
2. Technical Feasibility.
3. Operational Feasibility.

Computerized Library System Page 13


All projects are feasible - given unlimited resources and infinite time.
Unfortunately, the development of a computer - based system or product is more likely
plagued by a scarcity of resources and difficult (if not downright unrealistic) delivery dates.
It is both necessary and prudent to evaluate the feasibility of a project at the earliest
possible time.

 Need of the system:

A computerized system is needed mainly because of the lack of speed in the manual
system. Computerized system provides speed with accuracy. The new transaction
entries can be made instantly. The modification and deletion of records regarding the
transaction can be done in no time. The new system will not only make modification and
new transaction faster but also speedup the report generation. The generation of
reports will become time effective and the scope of generation will also increase. The
information flow will become faster. The transparency level will also increase. The
coordination between different modules will also increase. The manpower and the
paper work needed for maintaining the operation of the Library will be reduced by the
introduction of the computerized system.

 Flaws of the system:


Every system contains some flaws. In this system, when the user inputs wrong
data the system provides wrong output. The main flaw of the system is it is very expensive.
The estimate of purchase and installation goes very high. Following are the some
Advantages & Disadvantages of the System.

Advantages:

 The system excludes the use of paper work by managing all the book
information electronically.
 Admin can keep updating the system by providing the new books arrival in
system and their availability thus students need not to go to library for
issuing purpose.
 The system has books well organized and systematically arranged in different
categories in the system so that user can easily search and find the book.
 Thus, it saves human efforts and resources.

Computerized Library System Page 14


Disadvantages:

 Computerized system is very expensive.


 Computerized system is not easy to understand by anyone.
 We have to supply correct data and information. If we supplied wrong data
or information, system cannot correct it and we get wrong output.
 We can delete any record easily.
 There is no human interaction if users have some enquiry.

 From the above topics we see that old system is too bad and to fulfill the
requirements of the old system and to take the advantage of new system,
the new system is requirement.

Computerized Library System Page 15


SYSTEM
SPECIFICATION
s

Computerized Library System Page 16


HARDWARE AND SOFTWARE REQUIREMENTS

HARDWARE REQUIREMENT:
Above requirements are only for optimal need and required only if the project is
upgraded up to the level that marked lot of powerful improvements.

SOFTWARE REQUIREMENT:
 Microsoft Visual Basic 6.0 (Front-End DEVELOPMENT)
 Microsoft Office Access 2003 (Back-End )

Visual Basic Developing Tools


Computerized Library System Page 17
VISUAL BASIC :-
Visual basic 6.0 comes only in 32 bit version and in following edition.
 Learning Edition
 Professional Edition
 Enterprise Edition

The Learning Edition:-


The visual basic learning edition allows programmers to easily create powerful
application for Microsoft Window 95 and Window NT. The Learning Edition has
limited features and it includes intrinsic controls some commonly required custom
control (like Grid, Tab, Outline, Bound Control and Common Dialog) and limited data
access features.

The Professional Edition:-


The professional edition provide computer professional with a full featured set of
tools developing solution for other. The professional edition includes all the features
of a learning edition plus - All the database functionalities & additional Active X
control.

The Enterprise Edition:-


The enterprise edition allows professional to create robust distributed application in
team selling. The enterprise edition is targeted in team selling. The enterprise
edition is targeted at serious developers and includes additional tool for
client/server application development. The enterprise edition includes all the
features of the professional edition plus-
 Application Performing Explorer
 Remote Auto Connection Manager
 Component Management
 Database Management Tools
 MS-Visual Source Safe-Project Oriented Version
 The Data Environment and the Data Report Designers

What’s New in Visual Basic 6.0 Version?


Enhancement Development Environment:-
Visual basic 6.0 has added lots of enhancement to the Environment. Some of the
features are as follow. You can context or pop-up menus for forms control and code
attach add-ins for sources code control and other features. You can customize your
development Environment. While writing code in the code window drop-down list
box of properties comes with respect to the control. Full module view & procedure
module views are provided. You can comment/uncomment the block marked. With
the professional edition you can even create your own add-ins.

Computerized Library System Page 18


Multiple Projects:-
Visual basic supports projects a group that contain more than one project. Multiple
projects can be opened in the same instance of visual basic to enable simultaneous
debugging.
Declare Raise & Handle Your Own Events:-
Object provided by your own Active-X Components can raise events that can be
handled in other application. You can handle events raised by other application, or
by your own objects, using with events variables.
Enumeration:-
Enumeration provides you to create C style enumeration to work with sets of related
constants and to associate constant value with names.
Native Code Complier:-
All types of Visual basic application can now be complied to P-code (pseudo code) or
native code. Visual basic 6.0 now contains a native complete executables.
Typed Optional Arguments:-
Optional Arguments in procedure no longer have to be variants they can have
explicit data default values to be used if no longer is supplied. Type D optional
arguments can be used in all the procedure types, including property procedures.
You can get compile time data type checking for optional property and method
arguments. Also you can supply default values to be used when arguments is
omitted.
Global object:-
You can create reusable objects, with their own properties and assemble them into
an object model. The defamations of these objects are called classes and are
contained in Visual basic’s new modules. To simplify the creation of reusable code
libraries, Visual basic lets you marks the object in a code component as global, so
that their methods can be invoked without explicitly creating an instance of the
global object.
Polymorphism and Friends:-
Visual basic 6.0 supports Polymorphism through implements features. The
implement features allows your classes to support multiple interferences. The
implement features allows your classes to support multiple interferences. The
friend’s modifier works like the private class for modules outside your application,
yet it works like public class for modules within your application.
Jet 3.5 Database Engine:-
The Microsoft Jet 3.5 (32-bit) version database engine provides many features. This
version can read Jet 1.0 to 2.5 (16 bit). DAO user RDO to implement its feature
(ODBC) direct. It provides improved speed for many queries. In addition, the Jet 3.5-
engine supports database replication, and direct manipulation of replicated database
from within visual basic code.
Visual data manager:-
Computerized Library System Page 19
It is a useful utility and a simple application that support all the DAO method
ODBC Direct
Allows you to access ODBC data sources through the RDO with the DAO
Object, by passing the Microsoft jet data base engine. You can also used ODBC direct
through the data control by binding the controls to the data and setting an ODBC Direct
property
OLE Drag and drop:-
Most of the control support drag and drop operation between OLE applications
And control for ex. dragging the control of a word document into a text box control
Create your own active control / active X document:-
You can combine existing control or create your own from scratch.
Active X control created with a visual basic has events, data binding support,
Licensing support, property pages. Internet feature and more. Active X document
Boost your visual basic application to the internet and internet browser windows.
Winsock control:-
A Winsock control allows you to remote machine and exchange data using either the
user data gram protocol (YDP) or the transmission control protocol (TCP).
Both the protocol is used to create client and server application.
The visual basic development cycle:-
Here are the eight steps to create a visual basic program. The first eight steps are what
programmer call the development cycle:-
1) Decide what you want your computer to do.
2) Decide how your programmer will look on your screen. (How your program looks
on the screen if it is the user interface).
3) Draw your user interface using common parts as windows, menus and command
button.(These parts of a interface arew3 called object and controls).
4) Define the name, color, size and appearance of your user interface object. (An
object characteristic is its property).
5) Write instruction in BASIC code to make each part of the programmer do
something. (Basic instructions are called as commands).
6) Run the program and see if it works.
7) Look for errors (or bugs) in year program
User interface properties:-
After you design your design interface, the next step is defining the property of each
form and object. An object’s property determines the object’s name, color, size location and
appearance on the screen.
Different object have different property. Each time you create a new object, visual
basic assigns it default property values.
Each time you create a new form you have to create a new form, you have to give a
file name to identify what the form does.
Writing BASIC code:-

Computerized Library System Page 20


Until this point, writing a visual basic program has been completely unlike writing a
c or Pascal program and Pascal programmers usually begin by the writing code, while until
now, visual basic program have just been doodling on their computer screen, creating their
user interface.
When you are happy with the way your user interface looks, the finale step involves
writing BASIC commands (also known as code) to make your program
After you’ve written your BASIC Commands, Visual basic, saves them as part of the form
stored in the FRM files.
Running Visual basic program are as follows:-
If someone doesn’t on a copy of visual basic, their user can run your visual basic program
only if you to have compiled it to and .EXEfile
The .EXT version of a vi9suale basic program runs much faster than the same
program running from visuals basic.
Compiling the programs into a .EXE file lets you keep the originals FRM and MAK files
to yourself .That way, other can never see (and possibly copy) how you wrote your
programs.
Using a toolbar to create object:-
With the exception of the pointer (top left). All the icons you can see in the toolbar are
object you can see inside a form. You can create any object by the following steps:-
Click on the icon for the object you want to cover. The timer object will always be the same
size, but other object can be different sizes.
Release the mouse button and you will see your new object.
You notice that this object has a total of eight black square around i. these squares are
known as bundles, because you can use them to change the size of objects.

Accessing the database:-


Although there are numerous way to access data from a visual basic program by far the
easiest in the ADO data control (ADODC) and ADO bound data control the ADODC provides
and easy to use database link between your program and the data your are trying to access
placing an ADODC on a form and setting a few properties can create this link after the link is
establish, data can be displayed on the form by using bound controls. Bound controls in,
most cases are the standard visual basic control for which you set the data access
properties.
Following are the object exposed in the ADO object model:-
Connection object: - specifies information about the physical connection with a data source.
Command object: - store information about action performed on the data, such as data
modification and retrieval. You can use a command object to execute action on the data or to
return data from the server in a record set object.
Record set object, provide a rich selection of properties, events and method to
expose data in a field-row format, and thus allows you to programmatically traverse,
examine and manipulate specific field in specific row of data.
Parameters collection of the command object (made up of parameter object). Contain
information about field structure and content of the data in a record set object.

Computerized Library System Page 21


Error collection of the connection object (made up of error object). Contain information
about the most recent error that occurred when attempting an ADO operation.
Another approach to creating database application is to use the ActiveX data object (ADO)
in code. This method requires more efforts than using the ADODC, but there are some
advantages to using pure code. Some of this advantage is as follows:-
You can easily validate all the information entered by the user before it is saved to
the database. You reduced the possibility of locking conflicts in multi-user system because
your program controls when the record is locked. You can use transaction processing to
speed up data storage and to help preserve data integrity.
You can create database applications that do not require a visual interface. The data
control is only good for handling programs that have a visual component.
You basically have three main concerns when you program with ADO in VB:
Setting up and maintaining a connection to data with the connection object.
Initializing the Connection object in code:-
A connection object provides you with a connection to the data that the command
objet will object will operate on and the record set will retrieve. If you plan to connect your
record set to a data outside of your application, you must have at least one connection
object in the application.
The minimum steps you need to take to have a functional connection object are as
follows:-
Establishing a Connection Object:-
1) Make sure that you have set a reference to the ADO library.
2) Declaring an object variable whose type is ADODB. Connection. If you want to
program the event procedure of the object, use the with events keyword.
3) Set the connection objects connect string to reflect a valid OLE-DB provider, or
specify provider stream in the next step as follows:-
Provider=Microsoft.jet.OLEDB.3.51; persist security info=false;
Data source=C:\program files\Microsoft visuals studio\VB98\hospital.mdb
4) Call the connection object’s open method as in the following example:
CnNWind.Open provider Microsoft.jet.OLEDB.3.51\persist security into=false:
Data source=C:\program files\Microsoft visual stuiod\VB98\hospital.mdb Record set
The general steps you need to take to initialize a data –connected record set in you code are
as follows:-
1) Makes sure you have a valid connection or command object
2) Declare an object variable of the type ADODB.recordset
3) Set the source property (typically, a SQL statement or the name of a stored
procedure or table) & and the ACTIVECONNECTION property (use the set=syntax
to cause these property to point to a valid ADO connection object).

MICROSOFT ACCESS ANALYSIS TOOLS

Microsoft Access includes two tools that can help us to refine our database
design. The table analyzer Wizard can analyze the design of one table at a time, can purpose

Computerized Library System Page 22


new table structure and relationship if appropriate, and can restructure a table into new
related table makes sense.
The performance analyzer can either database or make recommendation and
suggestions for improving it. The wizard can also implement these recommendation and
suggestions.
About Designing Database
Before we use Microsoft Access to actually build the table, and other object
that will make up our database, it is important to take time to design our database. A good
database design is the keystone to creating a database that does what we want it to do
effectively, accurately and efficiently.
Step in designing a Database
Following basic steps are use in designing a database:
1) Determine the purpose of our database.
2) Determine the table we need in the database.
3) Determine the field we need in the table.
4) Identify field with unique values.
5) Determine the relationship between tables.
6) Refine our design.
7) Add data and create other database objects.
The heart of database is the information it holds. But there is other important
elements usually referred to as objects, in an access database there are various kinds
of objects we’ll be working with in access.
Data Integrity
Data integrity is more important in a database system than in a private file
environment in a database system the in a private file environment,
Because the database is shared. So if redundancy is removed, however the database may
still contain in correct data. Centralize control of database helps in avoiding this situation.
DBA is permitted to define validation procedure to be carried our whenever any update
operation is attempted.
Data Independence
Data independence is the immunity of application to change in storage
structure and access strategy, which implies that the application concerned don’t depend on
any one particular storage structure and access strategy.

Computerized Library System Page 23


DETAILED
SYSTEM
ANALYSIS

Detailed SYSTEM ANALYSIS

Book issue:

Computerized Library System Page 24


Return book:

Entity Relationship DIAGRAM

Computerized Library System Page 25


SYSTEM FLOWCHART

Computerized Library System Page 26


START

frmsplash

loginfrm

mdimain Add Accept


Members details of
members

Accept book Store it in


Add Books
details data base

Issue / Book Issue


Return

View performance
graphically

About

STOP

Computerized Library System Page 27


SYSTEM
DEVELOPMEN
T Of Project

Data dictionary related to project


FIELD NAME DATA TYPE BOOK
Book_ID Text
Title Text
Author Text
Computerized Library System Text
Publisher_Name Page 28

Category Text
Price Number
ISBN Text
Borrowed Yes/No
MEMBER

FIELD NAME DATA TYPE


Student ID Text
First Name Text
Middle Initial Text
Last Name Text
Class Text
Section Number
Roll Text
Picture Yes/No

TRANSACTION

FIELD NAME DATA TYPE


Book ID Text
Student ID Text
Date Borrowed Date/Time
Fines Number
Returned Yes/No

Computerized Library System Page 29


INPUT Screens

SPLASH FORM

Computerized Library System Page 30


LOGIN FORM

Computerized Library System Page 31


MDI FORM:

SETTING:

BOOK DETAILS (From View):

Computerized Library System Page 32


BOOK DETAILS (Grid View):

ADD NEW BOOK DETAILS:


Computerized Library System Page 33
MEMBER DETAILS (Grid View):

Computerized Library System Page 34


MEMBER DETAILS (From View):

ADD NEW MEMBER DETAILS:

Computerized Library System Page 35


BOOK ISSUE DETAILS:

Computerized Library System Page 36


BOOK RETURN DETAILS:

Computerized Library System Page 37


REPORT – BOOK DETAILS:

Computerized Library System Page 38


REPORT – MEMBER DETAILS:

REPORT – BOOK RETURN DETAILS:

Computerized Library System Page 39


Computerized Library System Page 40
SOURCE
CODE

SPLASH FORM:
Option Explicit
Private Sub Timer1_Timer()
If pbar1.Value < 100 Then

Computerized Library System Page 41


pbar1 = pbar1 + 1
Else
Timer1.Enabled = False
login.Show
Unload Me
End If
End Sub

LOGIN FORM:
Option Explicit
Private Sub btncancel1_Click()
Unload Me
End Sub

Private Sub btnok1_Click()


If txtuser1.Text = "1234" And txtpass1.Text = "5678" Then
frmMain.Show
Unload Me
Else
MsgBox "Invalid User Name and Password !"
txtuser1.Text = ""
txtpass1.Text = ""
txtuser1.SetFocus
End If
End Sub

BOOK DETAILS:
Option Explicit
'-------------------------------------------

Computerized Library System Page 42


'------------------------------------------
Private RS As ADODB.RecordSet

Private Sub Form_Load()

'Create recordset and refresh. Link Report icons to ImageList

On Error GoTo hell


Set RS = New ADODB.RecordSet
RS.CursorLocation = adUseClient
RS.Open "SELECT * FROM tblBooks", CN, adOpenDynamic, adLockOptimistic
Set DataGrid1.DataSource = RS
DisplayRecords
With frmMain.ImgList32
cmdReport(1).Picture = .ListImages(6).Picture
cmdReport(0).Picture = .ListImages(6).Picture
End With

Exit Sub

hell:
Handler Err
Resume Next

End Sub

Private Sub Form_Resize()

'Resize form to different screen sizes and resolution, also when form is resized

On Error Resume Next


SSTab1.Height = Me.Height - 2500
SSTab1.Width = Me.Width - 400

Line2.X1 = SSTab1.Left
Line2.X2 = SSTab1.Left + SSTab1.Width
Line2.Y1 = SSTab1.Top + SSTab1.Height + 400
Line2.Y2 = Line2.Y1
Line2.ZOrder vbBringToFront

DataGrid1.Width = SSTab1.Width - 280


DataGrid1.Height = SSTab1.Height - 580
Frame1.Height = DataGrid1.Height - 100
Frame1.Width = DataGrid1.Width - 200

Computerized Library System Page 43


Line3.X1 = Frame1.Left
Line3.X2 = Frame1.Width - Frame1.Left - 180
Line3.Y1 = txtDisp(6).Height + txtDisp(6).Top + 1000
Line3.Y2 = Line3.Y1

LineMove Line4, Line3


LineMove Line1, Line2

pic.Top = Line1.Y1 + 200


Label9.Top = pic.Top
Label11.Top = Label9.Top + Label9.Height
Image1.Top = pic.Top
fraNavigation.Top = pic.Top
fraNavigation.Left = Line1.X2 - fraNavigation.Width

End Sub

Private Sub Form_Unload(Cancel As Integer)

'Destroy recordset and form to free memory

Set RS = Nothing
Set frmBooks = Nothing

End Sub

Private Sub cmdOperations_Click(Index As Integer)

'Create new instances of Search/Sort/Filter forms and display them. Destroy when done
with

Dim obj As Form

If Index = 0 Then Set obj = frmSearch


If Index = 1 Then Set obj = frmFilter
If Index = 2 Then Set obj = frmSort

With obj
Set .SourceRs = RS
.Show vbModal
End With
Set obj = Nothing

Computerized Library System Page 44


End Sub

Private Sub cmdReport_Click(Index As Integer)

'Create dynamic reports

If Index = 0 Then cmdRefresh_Click


Set drBookList.DataSource = RS
drBookList.Show

End Sub

Private Sub DataGrid1_KeyUp(KeyCode As Integer, Shift As Integer)

'Allow keyboard navigation to display recordnumber

If KeyCode = 38 Or KeyCode = 40 Then DisplayRecords

End Sub

Private Sub DataGrid1_RowColChange(LastRow As Variant, ByVal LastCol As Integer)

'Allow mouse navigation to display recordnumber

DisplayRecords

End Sub

Private Sub DisplayRecords()

'Display the current and total number of record

Dim i As Integer

On Error Resume Next


With RS
If .RecordCount < 1 Then
txtcount.Text = 0
Else
txtcount.Text = .AbsolutePosition
End If
lblmax.Caption = .RecordCount

For i = 0 To 6

Computerized Library System Page 45


txtDisp(i).Text = .Fields(i)
Next i
End With
txtDisp(5).Text = FormatCurrency$(txtDisp(5).Text)

End Sub

Private Sub cmdDelete_Click()

'Deletes a record, undeletable if a book is borrowed.

Dim ans As Integer, pos As Integer

On Error GoTo hell


With RS
'Check if there is no record
If .RecordCount < 1 Then MsgBox "No record to delete.", vbExclamation: Exit Sub
'Check whether book is borrowed
If .Fields("Borrowed") = True Then MsgBox "You cannot delete this book record
because it is borrowed by someone" & vbNewLine & "The book must be returned to the
library before its record can be deleted.", vbInformation, "Book Borrowed"
'Confirm deletion of record
ans = MsgBox("Are you sure you want to delete the selected record?", vbCritical +
vbYesNo, "Confirm Record Deletion")
Screen.MousePointer = vbHourglass
If ans = vbYes Then
'Delete the record
pos = .AbsolutePosition
CN.BeginTrans
.Delete
.Requery
CN.CommitTrans
If pos > .RecordCount Then
If Not .EOF Or .BOF Then .MoveFirst
Else
.AbsolutePosition = pos
End If
MsgBox "Record has been successfully deleted.", vbInformation, "Confirm"
End If
Screen.MousePointer = vbDefault
End With

Exit Sub

Computerized Library System Page 46


hell:
On Error Resume Next
Handler Err
CN.RollbackTrans

End Sub

Private Sub cmdNavigate_Click(Index As Integer)

'Navigate a recordset through command buttons

Navigate Index, RS
DisplayRecords

End Sub

Private Sub cmdRefresh_Click()

'Refresh the recordset

With RS
.Filter = adFilterNone
.Requery
End With
DisplayRecords

End Sub

Private Sub cmdClose_Click()

'Close the form

Unload Me

End Sub

Private Sub cmdAMod_Click(Index As Integer)

'Open the add/edit form. Display current record values in form if modifying.

On Error Resume Next


With frmBooksAE
.AddState = Index
.OldID = RS.Fields(0)

Computerized Library System Page 47


If Index = 0 Then
.msdID.Text = RS.Fields(0)
.txtTitle.Text = RS.Fields(1)
.txtAuthor.Text = RS.Fields(2)
.txtPublisher.Text = RS.Fields(3)
.cmbCategory.Text = RS.Fields(4)
.txtPrice.Text = RS.Fields(5)
.msdISBN.Text = RS.Fields(6)
End If
.Show vbModal
End With
cmdRefresh_Click
DisplayRecords

End Sub

ADD NEW BOOK:


Option Explicit
Public AddState As Boolean, OldID As String
Private RS As ADODB.RecordSet

Private Sub Form_Load()

'Prepare form to add/edit. This is done because we are reusing the form.

On Error GoTo Err


Set RS = New ADODB.RecordSet
If AddState Then
Image1.Picture = frmBooks.cmdAMod(1).Picture
RS.Open "SELECT * FROM tblBooks", CN, adOpenStatic, adLockOptimistic
Me.Caption = "Add Record"
Else 'NOT AddState...
Image1.Picture = frmBooks.cmdAMod(0).Picture
Me.Caption = "Modify Record"
cmdAddSave.Caption = "Save"
RS.Open "SELECT * FROM tblBooks WHERE [Book ID] = '" & OldID & "'", CN,
adOpenStatic, adLockOptimistic
End If

Exit Sub

Computerized Library System Page 48


Err:
If Err.Number = 94 Or Err.Number = 3265 Then
Resume Next '-If encounter a null value
Else
Handler Err '-Unexpected error
End If

End Sub

Private Sub cmdAddSave_Click()

'Add or edit according to AddState

On Error GoTo hell


'Verify
If msdID.Text = "" Then msdID.SetFocus: Exit Sub
If txtTitle.Text = "" Then txtTitle.SetFocus: Exit Sub
If Len(msdID.Text) <> 10 Then MsgBox "All Book ID must be 10 charecters long",
vbExclamation: HighLight msdID: Exit Sub
msdID.Text = UCase$(msdID.Text)
If IsNumeric(Right$(msdID.Text, 9)) = False Then MsgBox "Book ID must start with B
followed by 9 digits", vbExclamation: HighLight msdID: Exit Sub

If AddState Then
If RecordExists("tblBooks", "Book ID", msdID.Text, msdID) = True Then Exit Sub
Else 'NOT AddState...
If msdID.Text <> OldID Then
If RecordExists("tblBooks", "Book ID", msdID.Text, msdID) = True Then Exit Sub
End If
End If

CN.BeginTrans
With RS
If AddState = True Then RS.AddNew
.Fields(0) = msdID.Text
.Fields(1) = txtTitle.Text
.Fields(4) = cmbCategory.Text
.Fields(5) = CCur(txtPrice.Text)
.Fields(6) = msdISBN.Text

If txtAuthor.Text = "" Then .Fields(2) = " " Else .Fields(2) = txtAuthor.Text


If txtPublisher.Text = "" Then .Fields(3) = " " Else .Fields(3) = txtPublisher.Text
If txtPrice.Text = "" Then txtPrice.Text = "0"
RS.Update

Computerized Library System Page 49


End With
CN.CommitTrans

If AddState Then
FindRecord RS, RS.Fields(0).Name, True, msdID.Text, 0
MsgBox "New record has been successfully added", vbInformation

If MsgBox("Do you want to add a new record?", vbQuestion + vbYesNo +


vbDefaultButton1) = vbYes Then
cmdReset_Click
Else
Unload Me
End If

Else 'NOT AddState...


FindRecord RS, RS.Fields(0).Name, True, msdID.Text, 0

MsgBox "Changes in record has been successfully saved", vbInformation


Unload Me
End If

Exit Sub

hell:
On Error Resume Next
Handler Err
CN.RollbackTrans

End Sub

Private Sub cmdCancel_Click()

Unload Me

End Sub

Private Sub cmdReset_Click()

'Reset all values to nothing/null/empty/nullstring/0

msdID.Text = ""
txtTitle.Text = ""
txtAuthor.Text = ""
txtPublisher.Text = ""

Computerized Library System Page 50


txtPrice.Text = ""
msdISBN.Text = ""
cmbCategory.ListIndex = 0

End Sub

MEMBER DETAILS:
Option Explicit

Private Sub cmdOperations_Click(Index As Integer)


'Shows the Search/Sort/Filter form by creating a new instance and destroying it once done
Dim obj As Form

If Index = 0 Then Set obj = frmSearch


If Index = 1 Then Set obj = frmFilter
If Index = 2 Then Set obj = frmSort

With obj
Set .SourceRs = RS
.Show vbModal
End With
Set obj = Nothing

End Sub

Private Sub cmdReport_Click(Index As Integer)


'Creates dynamic reports
If Index = 0 Then cmdRefresh_Click
Set drMembers.DataSource = RS
drMembers.Show

End Sub

Private Sub cmdRetrive_Click()


'Retrives a picture to be shown in the Photo box with the use of Photo Access User Control
Dim tmpRS As New ADODB.RecordSet

With tmpRS
.Open "SELECT [Picture] FROM tblMembers WHERE [Student ID]='" & txtDisp(0).Text &
"'", CN, adOpenForwardOnly, adLockOptimistic
If Len(RS!Picture) > 0 Then
picBox.LoadPhoto RS!Picture

Computerized Library System Page 51


Else
Set picBox.Picture = LoadPicture()
End If
.Close
End With
Set tmpRS = Nothing

End Sub

Private Sub Form_Load()


'Loads a form and initializes all variables
On Error GoTo hell
Set RS = New ADODB.RecordSet
RS.CursorLocation = adUseClient
RS.Open "SELECT * FROM tblMembers", CN, adOpenDynamic, adLockOptimistic
Set DataGrid1.DataSource = RS
DisplayRecords
With frmMain.ImgList32
cmdReport(0).Picture = .ListImages(6).Picture
cmdReport(1).Picture = .ListImages(6).Picture
End With

Exit Sub

hell:
Handler Err
Resume Next

End Sub

Private Sub Form_Resize()


'Resizes a form according to the screen size, resolution or form resize
On Error Resume Next
SSTab1.Height = Me.Height - 2500
SSTab1.Width = Me.Width - 400

Line1.X1 = SSTab1.Left
Line1.X2 = SSTab1.Left + SSTab1.Width
Line1.Y1 = SSTab1.Top + SSTab1.Height + 400
Line1.Y2 = Line1.Y1

DataGrid1.Width = SSTab1.Width - 280


DataGrid1.Height = SSTab1.Height - 580
Frame1.Height = DataGrid1.Height - 100

Computerized Library System Page 52


Frame1.Width = DataGrid1.Width - 200

lnBorder(0).X1 = Frame1.Left
lnBorder(0).X2 = Frame1.Width - Frame1.Left - 180
lnBorder(0).Y1 = txtDisp(3).Height + txtDisp(3).Top + 180
lnBorder(0).Y2 = lnBorder(0).Y1

lnBorder(2).X1 = lnBorder(1).X1
lnBorder(2).X2 = lnBorder(1).X2
lnBorder(2).Y1 = txtDisp(6).Height + txtDisp(6).Top + 180
lnBorder(2).Y2 = lnBorder(2).Y1

LineMove Line2, Line1


LineMove lnBorder(1), lnBorder(0)
LineMove lnBorder(3), lnBorder(2)

picBox.Left = txtDisp(0).Left + txtDisp(0).Width + 200


picBox.Top = txtDisp(0).Top
picBox.Height = Frame1.Height - cmdRetrive.Height - Frame1.Top
picBox.Width = Frame1.Width - picBox.Left - picBox.Width + txtDisp(0).Width

cmdRetrive.Left = picBox.Left + picBox.Width - cmdRetrive.Width

pic.Top = Line1.Y1 + 200


Label9.Top = pic.Top
Label11.Top = Label9.Top + Label9.Height
Label19.Left = picBox.Left
Label19.Top = picBox.Top - Label19.Height
Image1.Top = pic.Top
fraNavigation.Top = pic.Top
fraNavigation.Left = Line1.X2 - fraNavigation.Width

End Sub

Private Sub Form_Unload(Cancel As Integer)


'Destroys variables to free memory
Set RS = Nothing
Set frmMembers = Nothing

End Sub

Private Sub DataGrid1_KeyUp(KeyCode As Integer, Shift As Integer)

If KeyCode = 38 Or KeyCode = 40 Then DisplayRecords

Computerized Library System Page 53


End Sub

Private Sub DataGrid1_RowColChange(LastRow As Variant, ByVal LastCol As Integer)

DisplayRecords

End Sub

Private Sub DisplayRecords()

'-Display the current and total number of record

Dim i As Integer

On Error Resume Next

With RS
If .RecordCount < 1 Then
txtcount.Text = 0
Else
txtcount.Text = .AbsolutePosition
End If
lblmax.Caption = .RecordCount

For i = 0 To 6
txtDisp(i).Text = .Fields(i)
Next i

End With

End Sub

Private Sub cmdDelete_Click()


'Deletes a record
On Error GoTo hell
With RS
'-Check if there is no record
If .RecordCount < 1 Then MsgBox "No record to delete.", vbExclamation: Exit Sub
'-Confirm deletion of record

Dim ans As Integer, pos As Integer


ans = MsgBox("Are you sure you want to delete the selected record?", vbCritical +
vbYesNo, "Confirm Record Deletion")

Computerized Library System Page 54


Screen.MousePointer = vbHourglass
If ans = vbYes Then
'-Delete the record
pos = .AbsolutePosition
CN.BeginTrans
.Delete
.Requery
CN.CommitTrans
If pos > .RecordCount Then
If Not .EOF Or .BOF Then .MoveFirst
Else
.AbsolutePosition = pos
End If
MsgBox "Record has been successfully deleted.", vbInformation, "Confirm"
End If
Screen.MousePointer = vbDefault
End With

Exit Sub

hell:
Handler Err
CN.RollbackTrans

End Sub

Private Sub cmdNavigate_Click(Index As Integer)


'
Navigate Index, RS
DisplayRecords

End Sub

Private Sub cmdRefresh_Click()

With RS
.Filter = adFilterNone
.Requery
End With

End Sub

Private Sub cmdClose_Click()

Computerized Library System Page 55


Unload Me

End Sub

Private Sub cmdAMod_Click(Index As Integer)

On Error Resume Next


With frmMembersAE
.AddState = Index
.OldID = RS.Fields(0)
If Index = 0 Then
.txtCode.Text = RS(0)
.txtFirst.Text = RS(1)
.txtM.Text = RS(2)
.txtLast.Text = RS(3)
.cmbClass.Text = RS(4)
.cmbSection = RS(5)
.txtRoll = RS(6)
End If
.Show vbModal
End With

cmdRefresh_Click
DisplayRecords

End Sub

ADD NEW MEMBER;


Option Explicit

Private RS As ADODB.RecordSet
Public OldID As String, AddState As Boolean

Private Sub Form_Load()

Computerized Library System Page 56


On Error GoTo Err
Set RS = New ADODB.RecordSet
If AddState Then
Image1.Picture = frmMembers.cmdAMod(1).Picture
RS.Open "SELECT * FROM tblMembers", CN, adOpenStatic, adLockOptimistic
Me.Caption = "Add Record"
Else 'NOT AddState...
Image1.Picture = frmMembers.cmdAMod(0).Picture
Me.Caption = "Modify Record"
cmdAddSave.Caption = "Save"
RS.Open "SELECT * FROM tblMembers WHERE [Student ID] = '" & OldID & "'", CN,
adOpenStatic, adLockOptimistic
If Len(RS!Picture) > 0 Then
Photo1.LoadPhoto RS!Picture
End If
End If
cmbClass.Clear
cmbClass.AddItem "BCCA"
cmbClass.AddItem "BCA"
cmbClass.AddItem "BBA"
cmbClass.AddItem "B.Sc"
cmbClass.AddItem "B.Com"
cmbClass.AddItem "M.Com"
cmbSection.Clear
cmbSection.AddItem "I"
cmbSection.AddItem "II"
cmbSection.AddItem "III"

Exit Sub

Err:
If Err.Number = 94 Or Err.Number = 3265 Then
Resume Next 'If a null value is encountered
Else
Handler Err 'Unexpected error
End If

End Sub

Private Sub cmdAddSave_Click()

'Add or save data in the recordset according to AddState

On Error GoTo hell

Computerized Library System Page 57


If txtFirst.Text = "" Then txtFirst.SetFocus: Exit Sub
If txtLast.Text = "" Then txtLast.SetFocus: Exit Sub
If cmbClass.Text = "" Then cmbClass.SetFocus: Exit Sub
If cmbSection.Text = "" Then cmbSection.SetFocus: Exit Sub
If txtRoll.Text = "" Then txtRoll.SetFocus: Exit Sub
If IsNumeric(txtRoll.Text) <> True Then MsgBox "Roll Numbers must be numeric and
between 1 and 99", vbExclamation, "Type Mismatch": HighLight txtRoll: Exit Sub
txtRoll.Text = Int(txtRoll.Text)
If txtRoll.Text < 1 Or txtRoll.Text > 99 Then MsgBox "Roll numbers must be between 1 and
99", vbExclamation, "Type Mismatch": HighLight txtRoll: Exit Sub
MakeCode

If AddState Then
If RecordExists("tblMembers", "Student ID", txtCode.Text, txtCode) = True Then Exit
Sub
Else 'NOT AddState...
If txtCode.Text <> OldID Then
If RecordExists("tblMembers", "Student ID", txtCode.Text, txtCode) = True Then Exit
Sub
End If
End If

CN.BeginTrans
With RS
If AddState Then RS.AddNew
.Fields(0) = txtCode.Text
.Fields(1) = txtFirst.Text
.Fields(2) = IIf(txtM.Text = "", " ", txtM.Text)
.Fields(3) = txtLast.Text
.Fields(4) = cmbClass.Text
.Fields(5) = cmbSection.Text
.Fields(6) = txtRoll.Text
Photo1.SavePhoto .Fields("Picture")
RS.Update
End With
CN.CommitTrans

If AddState Then
FindRecord RS, RS.Fields(0).Name, True, txtCode.Text, 0
MsgBox "New record has been successfully added", vbInformation

If MsgBox("Do you want to add a new record?", vbQuestion + vbYesNo +


vbDefaultButton1) = vbYes Then

Computerized Library System Page 58


cmdReset_Click
Else
Unload Me
End If

Else 'NOT AddState...


FindRecord RS, RS.Fields(0).Name, True, txtCode.Text, 0

MsgBox "Changes in record has been successfully saved", vbInformation


Unload Me
End If

Exit Sub

hell:
On Error Resume Next
CN.RollbackTrans
Handler Err

End Sub

Private Sub cmbClass_Click()

MakeCode

End Sub

Private Sub cmbSection_Click()

MakeCode

End Sub

Private Sub txtRoll_LostFocus()

MakeCode

End Sub

Private Sub cmdCancel_Click()

Unload Me

End Sub

Computerized Library System Page 59


Private Sub cmdPicInsert_Click()

'Open photo from disk

Photo1.OpenPhotoFile

End Sub

Private Sub cmdPicSave_Click()

'Save photo to disk

On Error GoTo hell


cmdlg.ShowSave
If cmdlg.Filename <> "" Then
SavePicture Photo1.Picture, cmdlg.Filename
End If
hell:

End Sub

Private Sub cmdPicShow_Click()

'Open photo from a temp file

On Error Resume Next


Kill "tmp.jpg"
SavePicture Photo1.Picture, "tmp.jpg"
ShellEx "tmp.jpg"

End Sub

Private Sub cmdReset_Click()

txtCode.Text = ""
txtFirst.Text = ""
txtLast.Text = ""
txtM.Text = ""
txtRoll.Text = ""
cmbClass.ListIndex = 0
cmbSection.ListIndex = 0

End Sub

Computerized Library System Page 60


Private Sub MakeCode()

'This sub automatically generates Student Code

Dim A As String, b As String

If cmbSection.Text <> "" And txtCode.Text <> "" And txtRoll.Text <> "" Then
Select Case cmbSection.ListIndex
Case 0: A = "AQ"
Case 1: A = "AU"
Case 2: A = "CG"
Case 3: A = "PS"
End Select
b = cmbClass.ListIndex + 1
If b = 10 Then b = "X"
If txtRoll.Text < 10 Then txtRoll.Text = "0" & txtRoll.Text
txtCode.Text = A & b & txtRoll.Text
End If

End Sub

ISSUE DETAILS;
Option Explicit

Private Sub cmdBook_Click()

With frmSelectDg
.CommandText = "Select * From tblBooks where Borrowed=False"
.DataGrid1.Caption = "Members Table"
.Show vbModal
If .OKPressed Then
Text5.Text = .rRS1
Text2.Text = .rRS2
End If
End With

End Sub

Private Sub cmdCancel_Click()

Unload Me

Computerized Library System Page 61


End Sub

Private Sub cmdCode_Click()

Dim A As String, b As String, c As String

With frmSelectDg
.CommandText = "Select * From tblMembers"
.DataGrid1.Caption = "Members Table"
.Show vbModal
If .OKPressed Then
Text4.Text = .rRS1
A = .rRS2
b = .rRS3
c = .rRS4
Text1.Text = A & " " & b & " " & c
End If
End With

End Sub

Private Sub cmdIssue_Click()

'Record that the book was taken in two places. In tblTrans, and in
'tblBooks which will set the Borrowed Boolean to True.

Dim RS As ADODB.RecordSet

If Text4.Text = "" Then Text4.SetFocus: Exit Sub


If Text5.Text = "" Then Text5.SetFocus: Exit Sub
On Error GoTo hell
CN.BeginTrans
Set RS = New ADODB.RecordSet
With RS
.Open "Select * from tblTrans", CN, adOpenDynamic, adLockOptimistic
.AddNew
.Fields(0) = Text5.Text
.Fields(1) = Text4.Text
.Fields(2) = Date
.Update
.Close

Computerized Library System Page 62


.Open "Select [Borrowed] from tblBooks where [Book ID]='" & Text5.Text & "'", CN,
adOpenDynamic, adLockOptimistic
.MoveFirst
.Fields(0) = True
.Update
.Close
Set RS = Nothing
End With
CN.CommitTrans
If MsgBox("The book " & Text5.Text & " has been issued to " & Text4.Text & vbNewLine &
"Do you want to create a new issue instance?", vbInformation + vbYesNo) = vbYes Then
cmdReset_Click
Else
Unload Me
End If

Exit Sub

hell:
Handler Err
CN.RollbackTrans

End Sub

Private Sub cmdReset_Click()

Text1.Text = ""
Text2.Text = ""
Text5.Text = ""
Text4.Text = ""
Text3.Text = FormatDateTime$(Date, vbLongDate)
Text6.Text = FormatDateTime$(Date + frmReturn.MaxDays, vbLongDate)

End Sub

Private Sub Form_Load()

cmdReset_Click
With frmMain
cmdCode.Picture = .ImgList16.ListImages(1).Picture
Me.Icon = .ImgList32.ListImages(7).Picture
End With
cmdBook.Picture = cmdCode.Picture
Image1.Picture = Me.Icon

Computerized Library System Page 63


End Sub

Private Sub Text4_Keypress(Keyascii As Integer)

cmdCode_Click

End Sub

Private Sub Text5_KeyPress(Keyascii As Integer)

cmdBook_Click

End Sub

RETURN DETAILS;
Option Explicit

Public MaxDays As Integer


Public FineAmnt As Currency

Private Sub cmdCancel_Click()

Unload Me

End Sub

Private Sub cmdReset_Click()

lblLate.Caption = "Select a book first"


lblFines.Caption = "Select a book first"
lblDate.Caption = "Select a book first"
txtFines.Text = ""
txtFines.Locked = True
Text1.Text = ""
Text4.Text = ""
Text2.Text = FormatDateTime$(Date, vbLongDate)

End Sub

Private Sub cmdReturn_Click()

Computerized Library System Page 64


Dim RS As ADODB.RecordSet

If Text4.Text = "" Then Text4.SetFocus


On Error GoTo hell
Set RS = New ADODB.RecordSet
With RS
CN.BeginTrans
.Open "Select [Borrowed] from tblBooks where [Book ID]='" & Text4.Text & "'", CN,
adOpenDynamic, adLockOptimistic
.MoveFirst
.Fields(0) = False
.Update
.Close

.Open "Select [Fines],[Returned] From tblTrans where [Book ID]='" & Text4.Text & "'" &
"And [Returned] = False", CN, adOpenDynamic, adLockOptimistic
.MoveFirst
.Fields("Fines") = CCur(txtFines.Text)
' .Fields("Fines") = txtFines.Text
.Fields("Returned") = True
.Update
.Close
CN.CommitTrans
End With
Set RS = Nothing

If MsgBox("The book " & Text4.Text & " has been returned from " & Text1.Text &
vbNewLine & vbNewLine & "Do you want to create a new return book instance?",
vbInformation + vbYesNo) = vbYes Then
cmdReset_Click
Else
Unload Me
End If

Exit Sub

hell:
Handler Err

On Error Resume Next


CN.RollbackTrans

Computerized Library System Page 65


End Sub

Private Sub cmdCode_Click()

Dim RS As ADODB.RecordSet, i As Integer

On Error Resume Next


With frmSelectDg

.CommandText = "SELECT tblTrans.[Book ID], tblTrans.[Student ID], tblBooks.Title,


[First Name] & ' ' & [Middle Initial] & ' ' & [Last Name] AS Borrower, tblTrans.[Date
Borrowed] FROM tblMembers INNER JOIN (tblBooks INNER JOIN tblTrans ON tblBooks.
[Book ID] = tblTrans.[Book ID]) ON tblMembers.[Student ID] = tblTrans.[Student ID] Where
(((tblTrans.Returned) = False)) ORDER BY tblTrans.[Book ID];"
.DataGrid1.Caption = "Members Table"
.Show vbModal

If .OKPressed Then
Text4.Text = .rRS1
Text1.Text = .rRS2
txtFines.Locked = False
Else

Exit Sub
End If
End With

Set RS = New ADODB.RecordSet


RS.Open "Select * from tblTrans Where [Book ID] ='" & Text4.Text & "'", CN,
adOpenDynamic, adLockOptimistic
lblDate.Caption = CDate(RS(2))

i = Date - CDate(lblDate.Caption)
If i < 0 Then i = 0
If MaxDays < i Then lblLate.Caption = i - MaxDays Else lblLate.Caption = "0"

lblFines.Caption = CStr(FormatCurrency$(FineAmnt * lblLate))

Computerized Library System Page 66


txtFines.Text = lblFines.Caption
Set RS = Nothing

End Sub

Private Sub Command4_Click()


On Error GoTo hell
Shell "calc.exe", vbNormalFocus
Exit Sub

hell:
MsgBox "The operating system cannot find the system calculator." & vbNewLine & "Please
check whether it is properly installed or not", vbCritical, "File not found"

End Sub

Private Sub Form_Load()

Me.Icon = frmMain.ImgList32.ListImages(8).Picture
Image1.Picture = Me.Icon
cmdReset_Click
cmdCode.Picture = frmMain.ImgList16.ListImages(1).Picture

End Sub

Private Sub Text4_Keypress(Keyascii As Integer)

cmdCode_Click

End Sub

Computerized Library System Page 67


OUTPUT
SCREEN
S

SPLASH FORM

Computerized Library System Page 68


LOGIN FORM

MDI FORM:
Computerized Library System Page 69
SETTING:

BOOK DETAILS (From View):

Computerized Library System Page 70


BOOK DETAILS (Grid View):

ADD NEW BOOK DETAILS:

Computerized Library System Page 71


MEMBER DETAILS (Grid View):

Computerized Library System Page 72


MEMBER DETAILS (From View):

ADD NEW MEMBER DETAILS:

Computerized Library System Page 73


BOOK ISSUE DETAILS:

Computerized Library System Page 74


BOOK RETURN DETAILS:

Computerized Library System Page 75


REPORT – BOOK DETAILS:

Computerized Library System Page 76


REPORT – MEMBER DETAILS:

REPORT – BOOK RETURN DETAILS:

Computerized Library System Page 77


Computerized Library System Page 78
IMPLEMENTATIO
N

Software testing :
Computerized Library System Page 79
Testing is one of the important steps in the software development phase. Testing is
performed to identify errors and is an integral part of the entire development and
maintenance process. The Library Management System has been put under rigorous testing
so as ensure the correctness of its design. The two basic testing strategies that were used:

1. Unit Testing.

2. Integration Testing.

7.1 UNIT TESTING

Unit testing was conducted to verify the functional performance of each modular
component of the software. Unit testing focuses on the smallest unit of software design i.e.
the module. White-box testing were heavily employed for unit testing.

7.1.1 Login Screen

Step Test Step Expected Actual Result Test


No Result Result
Enter a
username and An error
password (a showing Nothing actually popped up
1. correct “Username and the authentication seemed FAIL
password but & password succesful.
wrong mismatch
username

7.2 INTEGRATION TESTING

“Unit testing” focuses on testing a unit of the code.“Integration testing” is the next level of
testing. This „level of testing‟ focuses on testing the integration of “units of code” or
components. The Library Management System was tested as a whole.

7.2.1 Circulation and Remove Member Screen

Computerized Library System Page 80


Step Test Step Expected Actual Result Test
No Result Result
It must
Check out a
display
book when
that “The
the student
1. member Nothing was displayed and the FAIL
has already
can‟t book was checked out.
borrowed
borrow
three books.
more
books”.
Should
display
Member “The
with fine member PASS
tried to be has books to
removed return or
fine
to pay”

Computerized Library System Page 81


CONCLUSION

LIMITATION OF PROJECT:
The implementation of the system will reduce the time and effort of the users in terms of
adding, editing, searching, deleting and printing of records. The system can also help in
reducing the expenses of the library such as papers, folders, pensand other materials
needed in their current system. The system is LAN-based that enables the librarian to share
the records of the student such as the borrowing books, returning books, search books, and
Computerized Library System Page 82
prescriptions of the librarian. The student’s personal information/data may be stored upon
the request of authorized librarian. The assigned librarians are the only one who can share
any of the records/data of the students. The system is not capable of sharing its data from
other databases. The system will be developed using the Microsoft Visual Basic 6.0

Scope & FUTURE of PROJECT:


In this system, we have not included online book order. So in Future we will expand our
system with this facility.
 This system is work only client-side. But in future we will develop client -server
system.
 In client-server system ,there will be multiple user and that system is work at
server-side

CONCLUSION:-

Computerized Library System simplifies the manual work load and is helpful in the effective
transactions of the library. The work load of the administrator is reduced to a great extent
by computerized transactions and instant information about the books in the library. The
members of the library are provided a very interactive interface to search for the books by
title as well as author. The administrator can instantly make changes to the database.
Computerized Library System provides messages whenever required viz. limit reached of
member to borrow books, error when trying to remove member who still has to pay fine.
Thus the mini project Computerized Library System by implementing VB as front end and
Oracle as back end was achieved and tested accordingly.

Computerized Library System Page 83


BIBLIOGRAPH
Y

Bibliography:

For the completion of project “Digital Feedback Form”, we have taken reference from variety
of book related to Visual Basic, which helped us a lot for successful completion of this
project. The books referred are as follows:

 System Analysis and Design.


Elias M. Awad (Galgotia Publications(p)Ltd.)

 Visual Basic (Module II).

Computerized Library System Page 84


NCPUL Group (BPB Publication Pvt.Ltd.)

 Analysis and Design of Information System.


V.Rajaraman (PHI Publication)

 Database Management Design.


C.S.V.Murthy (Himalaya Publication Ltd.)

 Ms-Access .
Dummics

References :
 www.google.com

Computerized Library System Page 85

You might also like