Link to home
Start Free TrialLog in
Avatar of Mike_Stevens
Mike_StevensFlag for United States of America

asked on

Moving through a Dataset using VB.NET in a Webform

I am working on a simple web application that will allow users to add, update or delete information about customers.   I would normally use VB6 and ado to do this becuase it would allow me to move around a recordset using buttons for previous, next, add new, delete and save to handle all of the basic editing functions.

Because this new project that i am working on needs to be web based i am using visual studio.net.   I am looking for any input or examples of code that i can use to move through a dataset in the same manner that i am familiar with in VB6/ADO.

I am using the following to connected to my database (Access Database) and to fill the dataset.  

 Dim strSQL As String
        Dim strConn As String

        strConn = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Application("Data_Path") & ";Jet OLEDB:Database Password=exhibit_info@05"
        strSQL = "SELECT * FROM tblExhibitor_Info ORDER BY tblExhibitor_Info.Last_Name, tblExhibitor_Info.First_Name;"

        Dim cn As New OleDb.OleDbConnection(strConn)
        Dim da As New OleDb.OleDbDataAdapter(strSQL, strConn)
        Dim ds As New DataSet
       
        cn.Open()

        If Not IsPostBack Then
            da.Fill(ds, "exhibitor_info")
        End If


I would greatly appreciate some expert help!

Thanks
Avatar of CaptainRantflaps
CaptainRantflaps

Are you binding this to a Datagrid control? if so, use the paging option and you will automatically get prev/next or numbering for each separation of the data.
Avatar of Mike_Stevens

ASKER

I am using textbox controls.
Let me see I have this right, you want to display the first value from your dataset in a text box, and have next and prev buttons, clicking next will move to the next record etc?
Yes.  That is what i am trying to do.
ASKER CERTIFIED SOLUTION
Avatar of jyotisinha
jyotisinha

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial