|
-
May 27th, 2002, 04:22 AM
#1
Thread Starter
Lively Member
moving through records in .net
Hi All,
I am having some trouble moving through records using .net. What im trying to do is move through the records stored in my dataset one at a time (each time i click a button), and then display certain fields. I would also like to be able to go back through records one at a time. maybe theres a .next and .previous function i can use. Any help would be appreciated.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim flag As Integer = 0
Dim db As OleDbConnection = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\helpdesk.mdb;")
Dim faultsDA As New OleDbDataAdapter("Select * from faults WHERE jobReview = 0 ", db)
Dim faultsDS As DataSet = New DataSet()
faultsDA.Fill(faultsDS, "faults")
Dim faultsRow As System.Data.DataRow
Dim temp As String
For Each faultsRow In faultsDS.Tables("faults").Rows(0)
temp = faultsRow("currentStatus")
Label2.Text = temp
Next
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|