Navigation in dataset going backwards when asking to go next

vb.net 2003
access 2003 backend

loading the dataset via code:   no textboxes are bound...all are unbound..
Dim das1 As New System.Data.DataSet()
    Dim cnn1 As New OleDb.OleDbConnection( _
                "Provider=Microsoft.Jet.OLEDB.4.0;" & _
                "Data Source=c:\Program Files\" & _
                "Crs_iCart\Beta_2010_Crs_iCart.mdb")
    Dim query As String = "SELECT * FROM tblMainData Order By MainTableID DESC "
    Dim dap1 As New System.Data.OleDb.OleDbDataAdapter(query, cnn1)
   
Problem:
The data loads as I ask: the Maintable id is descending.
so If I have 21 records record id "21" shows up


Weird Part:
When I press the "next" it should do nothing..
But The records go to the previous record ?
21..20..19  etc...

When I press "previous" it does nothing ?

Thanks
fordraiders





Private Sub btnNext_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNext.Click
        'Move to next position
        Me.BindingContext(das1, "tblMainData").Position += 1
    End Sub

Private Sub btnPrevious_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPrevious.Click
        'Move to previous position
        Me.BindingContext(das1, "tblMainData").Position -= 1
    End Sub

Open in new window

LVL 3
FordraidersAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

CodeCruiserCommented:
>Dim query As String = "SELECT * FROM tblMainData Order By MainTableID DESC "

Its because you have DESC sorting applied to it. Remove DESC from the query.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.