Hi,
i am fairly new to VB.Net programming having been a VB6 developer for years (the copmany i used to work form maintained VB6 apps)?
I am writing a new application. I have created my form, databindings to the fields and everything works ok.
In order to filter through the dataset i have decided to use BindingContexManager. I have tried currency manager also.
The problem i am incurring is that when i click button next it goes forward 3 records then loops back to the first record again. If i skip to the end of the dataset i can browse back 26 records before it loops back ot the first record and gets stuck in a loop.
I know for a fact that 11000 records are returned???
i am fairly new to VB.Net programming having been a VB6 developer for years (the copmany i used to work form maintained VB6 apps)?
I am writing a new application. I have created my form, databindings to the fields and everything works ok.
In order to filter through the dataset i have decided to use BindingContexManager. I have tried currency manager also.
The problem i am incurring is that when i click button next it goes forward 3 records then loops back to the first record again. If i skip to the end of the dataset i can browse back 26 records before it loops back ot the first record and gets stuck in a loop.
I know for a fact that 11000 records are returned???
VB.NET:
'Check if the Members Table already exists and remove
If Not MembersDataset.Tables("Members") Is Nothing Then MembersDataset.Tables.Remove("Members")
MembersDataAdapter.SelectCommand = New OleDbCommand("SELECT * FROM MEMBERS ORDER BY MEMBERS.MEMBER_NO ASC", MainForm.oConn)
'Add Table And Fill with Data
MembersDataset.Tables.Add("Members")
MembersDataAdapter.Fill(MembersDataset, "Members")
' Create the Binding Manager
MembersBinder = Me.BindingContext(MembersDataset, "Members")
Private Sub FirstRecordCmd(ByVal sender As System.Object, ByVal e As System.EventArgs)
Me.MembersBinder.Position = 0
End Sub
Private Sub PreviousRecordCmd(ByVal sender As System.Object, ByVal e As System.EventArgs)
Me.MembersBinder.Position = Me.MembersBinder.Position - 1
End Sub
Private Sub RemoveFilterCmd(ByVal sender As System.Object, ByVal e As System.EventArgs)
End Sub
Private Sub NextRecordCmd(ByVal sender As System.Object, ByVal e As System.EventArgs)
Me.MembersBinder.Position = Me.MembersBinder.Position + 1
End Sub
Private Sub LastRecordCmd(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LastRecord.Click
Me.MembersBinder.Position = Me.MembersBinder.Count - 1
End Sub