Lab 10.Write a Visual Basic Program for BOOK Database
Private Sub Command1_Click()
num = InputBox("Enter the isbn No")
Adodc1.RecordSource = "select * from book where isbn='" + num + "' "
Adodc1.Refresh
End Sub
Private Sub Command2_Click()
str2 = InputBox("Enter the Title")
Adodc1.RecordSource = "select * from book where title ='" + str2 + "' "
Adodc1.Refresh
End Sub
Private Sub Command3_Click()
str1 = InputBox("Enter the Author name")
Adodc1.RecordSource = "select * from book where authorname ='" + str1 + "' "
Adodc1.Refresh
End Sub
Private Sub Command4_Click()
Adodc1.RecordSource = "select * from book"
Adodc1.Refresh
End Sub
Private Sub Command5_Click()
Unload Me
End Sub
num = InputBox("Enter the isbn No")
Adodc1.RecordSource = "select * from book where isbn='" + num + "' "
Adodc1.Refresh
End Sub
Private Sub Command2_Click()
str2 = InputBox("Enter the Title")
Adodc1.RecordSource = "select * from book where title ='" + str2 + "' "
Adodc1.Refresh
End Sub
Private Sub Command3_Click()
str1 = InputBox("Enter the Author name")
Adodc1.RecordSource = "select * from book where authorname ='" + str1 + "' "
Adodc1.Refresh
End Sub
Private Sub Command4_Click()
Adodc1.RecordSource = "select * from book"
Adodc1.Refresh
End Sub
Private Sub Command5_Click()
Unload Me
End Sub
Leave a Comment