Warning: mysqli_connect() [function.mysqli-connect]: (28000/1045): Access denied for user 'itprojec_abhi'@'localhost' (using password: YES) in /home1/itprojectsco/public_html/includes/database.php on line 13
Ready Project |BCA Project | MCA Project | BBA Project | MBA Project |INDIA'S BIGGEST COLLEGE PROJECT STORE
Option Explicit

Dim C As New Connection
Dim R As New Recordset
Dim S As String
Private Sub cmdAdd_Click()
txtBno.Text = ""
txtBname.Text = ""
txtAuthor.Text = ""
txtPrice.Text = ""
txtBno.SetFocus
End Sub
Private Sub cmdDelete_Click()
Dim id
id = InputBox("Enter Book number")
R.Close
S = "delete from tblBook where (bno=" & id & ")"
R.Open S, C, adOpenDynamic, adLockOptimistic
S = "Select * From tblBook"
R.Open S, C, adOpenDynamic, adLockOptimistic
If Not R.BOF And Not R.EOF Then
R.MoveFirst
txtBno.Text = R.Fields(0).Value
txtBname.Text = R.Fields(1).Value
txtAuthor.Text = R.Fields(2).Value
txtPrice.Text = R.Fields(3).Value
End If
MsgBox "Book Deleted Successfully!", vbInformation, "Book"
End Sub
Private Sub cmdNext_Click()
R.MoveNext
If Not R.EOF Then
txtBno.Text = R.Fields(0).Value
txtBname.Text = R.Fields(1).Value
txtAuthor.Text = R.Fields(2).Value
txtPrice.Text = R.Fields(3).Value
Else
MsgBox "No More Records!", vbInformation, "Book"
End If
End Sub

Private Sub cmdSave_Click()
R.Close
S = "Insert Into tblBook Values(" & Val(txtBno.Text) & ",'" & txtBname.Text & "','" & txtAuthor.Text & "', " & Val(txtPrice.Text) & ")"
R.Open S, C, adOpenDynamic, adLockOptimistic
S = "Select * From tblBook"
R.Open S, C, adOpenDynamic, adLockOptimistic
If Not R.BOF And Not R.EOF Then
R.MoveFirst
txtBno.Text = R.Fields(0).Value
txtBname.Text = R.Fields(1).Value
txtAuthor.Text = R.Fields(2).Value
txtPrice.Text = R.Fields(3).Value
End If
MsgBox "Book Added Successfully!", vbInformation, "Book"
End Sub
Private Sub Form_Load()
S = "Select * From tblBook"
C.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=E:\VBSlipSol\Slip24\Ques-2\book.mdb;Persist Security Info=False"
R.Open S, C, adOpenDynamic, adLockOptimistic
If Not R.BOF And Not R.EOF Then
R.MoveFirst
txtBno.Text = R.Fields(0).Value
txtBname.Text = R.Fields(1).Value
txtAuthor.Text = R.Fields(2).Value
txtPrice.Text = R.Fields(3).Value
End If
End Sub

Search

Project Categories


    Warning: mysqli_query() expects parameter 1 to be mysqli, boolean given in /home1/itprojectsco/public_html/includes/sidebar.php on line 30

    Warning: mysqli_fetch_assoc() expects parameter 1 to be mysqli_result, null given in /home1/itprojectsco/public_html/includes/sidebar.php on line 32

Recent Posts


Warning: mysqli_query() expects parameter 1 to be mysqli, boolean given in /home1/itprojectsco/public_html/includes/widget.php on line 5

Warning: mysqli_fetch_assoc() expects parameter 1 to be mysqli_result, null given in /home1/itprojectsco/public_html/includes/widget.php on line 7

Sign In