I have a question, How do i insert values from an sql server column into an arraylist? So far i have been trying the sqldatareader, but have problems.
I have made all the connections, and they are working fine. The problem i am having is storing the strings in the arraylist 1 by 1(most likely using the while loop), to be able to retrieve them later in the page. I am using vb.net/asp.net.some of the code is posted below:
Dim myUserSql As String = "Select username from Customer"
Dim myCmd As New SqlCommand(myUserSql, dbconn)
Dim myreader As SqlClient.SqlDataReader
myreader = myCmd.ExecuteReader
The purpose of the project is to store usernames in an arraylist, to be checked against the input from the user when they input into the appropriate field.