I am using MS-Access 2003, VB.NET 2008, I am able to select and delete recordes. But how can I move between records?

Imports System.Data.OleDb
Class Window1
    Dim cn As OleDbConnection
    Dim cmd As OleDbCommand
    Dim dr As OleDbDataReader

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles Button1.Click 
        cn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\emp.mdb;")
        cmd = New OleDbCommand("select * from table1", cn)
        dr = cmd.ExecuteReader
            TextBox1.Text = dr(0)
            TextBox2.Text = dr(1)

    End Sub
End Class

This is what I have done so far but how can I movenext,last,previous,first? The way we used to in vb6 with recordsource.

The data reader is a forward only way of moving through the data extracted. You can use other types if you want to be able to arbitrarily select a position. The dataTable can be referenced by iterating through the rows so moving back forward is easy.

Hi Hericles,
I changed my program and used combobox instead. Thanx for the reply :)

This question has already been answered. Start a new discussion instead.