Mike_Stevens
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.OL EDB.4.0; Data Source=" & Application("Data_Path") & ";Jet OLEDB:Database Password=exhibit_info@05"
strSQL = "SELECT * FROM tblExhibitor_Info ORDER BY tblExhibitor_Info.Last_Nam e, tblExhibitor_Info.First_Na me;"
Dim cn As New OleDb.OleDbConnection(strC onn)
Dim da As New OleDb.OleDbDataAdapter(str SQL, 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
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.OL
strSQL = "SELECT * FROM tblExhibitor_Info ORDER BY tblExhibitor_Info.Last_Nam
Dim cn As New OleDb.OleDbConnection(strC
Dim da As New OleDb.OleDbDataAdapter(str
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
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.
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?
ASKER
Yes. That is what i am trying to do.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.