Monday, 4 April 2016

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

No comments:

Post a Comment