Right now I have a table called Products with 4 columns, one of which is simply called ProductName. Using the attached code, I can read the first cell which contains "Clamp" and it successfully displays inside my text box. But how do I tell VB to simply read the next cell down?
I thought it would be as simple as using TextBox1.Text = thisReader(1) but it gives me the error "Index was outside the bounds of the array."
I'm still learning VB so give it to me simple :)
Dim thisCommand As New SqlCommand _
("SELECT ProductName FROM Products", _
' Open Connection
' Execute Query
Dim thisReader As SqlDataReader = thisCommand.ExecuteReader()
TextBox1.Text = thisReader(0)