|
-
July 19th, 2005, 09:38 AM
#1
[SOLVED] datareader
hey,
got the following routine that checks if the first word in a listview is the same as the first word in a DB table.
My problem is that if they are not the same i want the routine to check the next listview record with the same DB record.
in other words, i need to push back the datareader one step (if possible) OR i'll need to change the way im looping
Code:
Dim a As Integer = 0
Dim dbReader As OleDb.OleDbDataReader
dbReader = cmd.ExecuteReader
If dbReader.HasRows Then
Do While dbReader.Read
a = a + 1
If dbReader("ReportName") = Me.ListView1.Items(a - 1).Text Then
If dbReader("View") = True Then
Me.ListView1.Items.Item(a - 1).Checked = True
End If
If dbReader("View") = False Then
Me.ListView1.Items.Item(a - 1).Checked = False
End If
Else
Me.ListView1.Items.Item(a - 1).Checked = False
End If
Loop
End If
thanks
Last edited by Nasty2; July 20th, 2005 at 01:42 AM.
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
|