I'm trying to retrieve and store 14 database records into variables using a DataReader(). I know how to store multiple fields into variables, but I don't know how to store 14 records with one column. I'm using MS Access and VB.
Try
con.Open()
dr = cmd.ExecuteReader()
While dr.Read
variableName = dr.Item("Description")
Now, how can I do it for the other 13 variables?????
End While
con.Close()
Catch ex As Exception
con.Close()
MsgBox(ex.Message) : Exit Sub
End Try
One thing you can try, is create a List variable, and then using a for each look, cycle through each data row, and add the column to the list variable. The code is not exact but should be enough information to get you along.