The Library Information System with form design visual basic 6.0 programs
The write a program and Create a library Information System in Visual Basic .
Library Information System Procedure : -
- Step 1 : Start
- Step 2 : Go to sql and Create a table .
- Step 3 : Then open a visual Basic Range.
- Step 4 : Create label , Textbox , Command Button Etc .
- Step 5 : Write a Coding For library information System .
- Step 6 : Click on Project - > Components - > Microsoft ADO DATA Control .
- Step 7 : click on Project - > Reference - > Microsoft Library .
- Step 8 : Go to Panel - > Administrator tool - > ODBC .
- Step 9 : Table Connected .
- Step 10 : Output will Display .
- Step 11 : End .
Library Information System Visual Basic Coding : -
GENERAL : -
Dim con As New ADODB . Connection
Dim rs As New ADODB . recordset .
FOR INSERT COMMAND BUTTON : -
Private Sub Command1 _ Click ()
rs . AddNew
rs!studentnumber = Val(Text1.Text)
rs!studentname = Trim(Text2.Text)
rs!Class = Trim(Text3.Text)
rs!booknumber = Trim(Text4.Text)
rs!booktname = Trim(Text5.Text)
rs!author = Trim(Text6.Text)
rs!issuedate = CDate(Text7.Text)
rs!duedate = Cdate(Text8.Text)
rs . Update
MsgBox “ one record inserted “
End Sub
FOR SEARCH COMMAND BUTTON : -
Private Sub Command2 _ Click ()
Dim rssearch As New ADODB . recordset
Dim qry As String
Dim I As Double
I=InputBox(“Enter the Student Number To Search”)
Qry=”select*From library8015 Where studetnumber =” & i
Rssearch . Open qry , con ,adOpenStatic,adLockOptimistic
If rssearch . Eof Then
Else
Text1 .Text = rssearch!studentnumbr
Text2 . Text = rssearch!studentname
Text3 . Text = rssearch!Class
Text4 . Text = rssearch!booknumber
Text5 . Text = rssearch!booknume
Text6 . Text = rssearch!author
Text7 . Text = rssearch!issuedate
Text8 . Text = rssearch!duedate
End If
End Sub
FOR REPORT COMMAND BUTTON : -
Private Sub Command3 _ Click ()
Data Report1.Show
End Sub
FOR CLEAR COMMAND BUTTON : -
Private Sub Command4 _ Click ()
Text1.Text = “ “
Text2.Text = “ “
Text3.Text = “ “
Text4.Text = “ “
Text5.Text = “ “
Text6.Text = “ “
Text7.Text = “ “
Text8.Text = “ “
Text1.SetFocus
End Sub
FOR EXIT COMMAND BUTTON : -
Private Sub Command5 _ Click ()
End
End Sub
FORM : -
Private Sub From _ Load ()
Con.Open “ dsn=shameer8015;uid=day1;pwd=day1;
rs.Open “select*from libray8015”;con , adOpenDynamic , adLockOptimistic
MsBox “ database connected “
End Sub
Library Information System DATABASE CREATION : -
Create table libray 8015 ( studentnumber numeric , studentname varchar (30) , class varchar (20) , booknumber numeric ,
bookname varchar (20) , author vatchar (20) , issuedate date , duedate date , )
THE Library Information System FORM DESIGN : -
Library Information System REPORT : -
Studentnumber : |
8015 |
Studentname : |
Rahman |
Class : |
BSC CS |
Booknumber : |
123597892 |
Bookname : |
V . b |
Author : |
Ali |
Issuedate : |
2019 - 01 -10 |
Duedate : |
2019 - 11 - 10 |
No comments:
Post a Comment