Hi all,
i am developing an application for gymnasium. i am using ms-access 2003 as my DB and vb.net for front end.
in one of my form i want to move next and prev in DB and display the info in text boxes.how it can be achieved using ADODB recordset object plz help me.
Loading
Binarni SustavPosted Sep 14, 2010, 10:57 AM
sanket bramhePosted Sep 14, 2010, 1:49 AM
But will u plz tell me how to define record set onject?I am getting problem with that.
plz help,plz provide syntax.
Binarni SustavPosted Sep 13, 2010, 2:27 PM
-----------
'Declare variable MaxRows.You need this to know how many rows you have in your table.Also declare another variable called "i"
Dim MaxRows As Integer
Dim i As Integer
'Now do this to form load event
MaxRows = ds.Tables("Your Table Name").Rows.Count
'Set i to -1
i=-1
'Make one button,let's call him Next and write this
If inc <> MaxRows - 1 Then
'Make your own subroutineinc = inc + 1
NavigateRecords()
Else
MsgBox("No More Rows")
End If
Private Sub NavigateRecords()
txtFirstName.Text = ds.Tables("Your Table Name").Rows(inc).Item(1)
txtSurname.Text = ds.Tables("Your Table Name").Rows(inc).Item(2)
End Sub
Hope I was helpful...