Hi

Im using an Access database however im unsure on how to loop through every row in the table.

I have the following function, which works great - but as you can see it will only display the first 50 rows in the table. How do i loop through all the rows if i dont know how many rows there are!?

VB Code:
  1. Private Sub printAllRows()
  2.         For u As Integer = 0 To 50 Step 1
  3.             lbProductData.Items.Add(m_dtProducts.Rows(u)("ProductName").ToString())
  4.         Next
  5.     End Sub

Thanks, Reeksy.