You are on page 1of 10

P.

29 Library Management System Library Management System Ratings: (0)|Views: 31,398|Likes: 60 Published by Vignesh PT This is a mini project as according to the syllabus of anna university for Database systems lab, 2nd Year, CSE. It implements VB as front end and Oracle as back end. The idea is Library management System. See More 27 6.2 CODING 6.2.1 Code for Login Screen This form allows the user to either login to the database as an administratoror a Guest.The Administrator is given all the privileges to modify the databaseaccording to his needs.Whereas the guest is not given the privileges to alter the database in anyway. However the Guest is allowed to query the database for informationand is allowed to view all sorts of information.Option ExplicitPublic LoginSucceeded As BooleanPrivate Sub cmdCancel_Click()LoginSucceeded = FalseMe.HideEnd SubPrivate Sub cmdOK_Click()If txtPassword = "admin" And txtUserName = "administrator" ThenWelcome.ShowLoginSucceeded =

TrueMe.HideElseMsgBox "Invalid UserName and Password, try again!", , "Login"txtPassword.SetFocusSendKeys "{Home}+{End}"End If End SubPrivate Sub Command1_Click()Welcome.Show 28 LoginSucceeded = TrueMe.HideEnd SubPrivate Sub Form_Load()txtPassword = ""txtUserName = ""End Sub 6.2.2 Code for Welcome Screen The startup screen allows the administrator to choose from four mainoptions.1. Administration2. Tech Processing3. Circulation4. Queries5. Lock and LogoutPrivate Sub Command1_Click()If frmLogin.txtUserName = "administrator" And frmLogin.txtPassword ="admin" ThenAdmin.ShowUnload MeElseMsgBox "Guest User Access Denied!!!", vbExclamationEnd If End SubPrivate Sub Command2_Click()Queries.ShowUnload MeEnd SubPrivate Sub Command3_Click() 29

If frmLogin.txtUserName = "administrator" And frmLogin.txtPassword ="admin" ThenTechProc.ShowUnload MeElseMsgBox "Guest User Access Denied!!!", vbExclamationEnd If End SubPrivate Sub Command4_Click()If frmLogin.txtUserName = "administrator" And frmLogin.txtPassword ="admin" ThenCirculation.ShowUnload MeElseMsgBox "Guest User Access Denied!!!", vbExclamationEnd If End SubPrivate Sub Command5_Click()frmLogin.txtUserName = ""frmLogin.txtPassword = ""Me.HidefrmLogin.ShowEnd SubPublic Sub Form_Load()Me.HidefrmLogin.ShowEnd Sub 6.2.3 Code for Administration Screen Administration is the key function of the administrator. It provides threeoptions to the admin.a) Add memberb) Modify member 30 c) Remove memberPrivate Sub Command1_Click()Addmem.ShowUnload MeEnd SubPrivate Sub Command2_Click()Modifymem.ShowUnload MeEnd SubPrivate Sub Command3_Click()Removemem.ShowUnload MeEnd SubPrivate Sub Command4_Click()Welcome.ShowUnload MeEnd Sub 6.2.4 Code for Add Member Screen

Dim con As New ADODB.ConnectionDim rs As New ADODB.RecordsetPrivate Sub Command1_Click()Admin.Showcon.CloseUnload MeEnd SubPrivate Sub Command2_Click()con.Execute ("insert into patron values(" & Val(id.Text) & ",'" &(patron.Text) & "','" & (Combo1.Text) & "','" & (doj.Text) & "','" &(doe.Text) & "',0,0)") 31 MsgBox "Member Created"End SubPrivate Sub Form_Load()con.Open ("Provider=MSDAORA.1;Password =tiger;User ID=scott;DataSource=Vignesh.world;Persist Security Info=True")Combo1.AddItem "Student"Combo1.AddItem "Lecturer"Combo1.AddItem "Non Teaching Staff"End Sub 6.2.5 Code for Modify Member Screen Dim con As New ADODB.ConnectionDim rs As New ADODB.RecordsetPrivate Sub Command1_Click()Admin.Showcon.CloseUnload MeEnd SubPrivate Sub Command2_Click()Set rs = con.Execute("update patron set name='" & (Text2.Text) &"',design='" & (Combo1.Text) & "',fine=" & Val(Text3.Text) & ",expiry='"& (Text4.Text) & "' where patron_id=" & Val(Text1.Text) & "")MsgBox "Update Successfull", vbInformationEnd SubPrivate Sub Command3_Click()Set rs = con.Execute("select * from patron where patron_id=" &(Text1.Text) & "")Text2.Text = rs.Fields.Item(1)Combo1.Text = rs.Fields.Item(2)Text3.Text = rs.Fields.Item(6)Text4.Text = rs.Fields.Item(4)End Sub

Activity (60) Filters Add to collectionReviewAdd noteLikeEmbed

Mahmoud Shetialiked this

rdsssenavirathna liked this 1 thousand reads 1 hundred reads

Winnie liked this

Syafiqah Sezale liked this

Ranjeet Kumar Singh liked this

Aya Yakout liked this

Aya Yakout liked this

Maheshwor Man Joshi liked this

Load more Recommended

PURCHASE ONLY

UML DIAGRAM OF LIBRARY MANAGEMENT SYSTEM AMAN VARSHNEY

Library Management System VB Project Documentation

LIJO AMAL JOY

Library Management System - proposal

IROSHAN PRIYANTHA

Library Management System

AZHARPRO

Library Management Pro- Report

VIRU7

Library Management System Project

PRACHI5711

36635777 Library Management System

NBHARWAD

Class Diagram for Online Library Management System

ARSALAN SHAIKH

Online Library Management System

VIKAS_IS_STUPID

library management system

TAVISHI THAPA

More From This User

NLM Pillbox API Documentation v2 2011.09.27

VIGNESH PT

IRAM

VIGNESH PT

Dna Computers

VIGNESH PT

M1GarandManual

VIGNESH PT

Table of Contents

VIGNESH PT

My Fifa 09 Guide

VIGNESH PT

Making money online Start up Booster

VIGNESH PT

Microsoft Windows Performance Boost

VIGNESH PT

Download and print this document


Read and print without ads Download to keep your version Edit, email or read offline Choose a format: .PDF Download Recommended .TXT

UML DIAGRAM OF LIBRARY MANAGEMENT SYSTEM aman varshney UML DIAGRAM OF LIBRARY MANAGEMENT SYSTEM

Library Management System VB Project ... Lijo Amal Joy

Library Management System - proposal Iroshan Priyantha This is a sample project proposal for a library management system.

Library Management System Azharpro Library Management systems Previous|NextPage 1 of 3 .PDF Download About

.TXT

Browse Books About Scribd Team Blog Join our team! Contact Us Subscriptions

Subscribe today Your subscription Gift cards

Advertise with us

Get started AdChoices Support

Help FAQ Press Purchase Help Partners

Publishers Developers / API Legal

Terms Privacy Copyright Get Scribd Mobile

Mobile Site Copyright 2014 Scribd Inc. Language: English