Greeting,
Can somebody help me with this code i don't know what is the problem here
Dim str As String = "SELECT DISTINCT FirstName,LastName FROM SessionMembers ORDER by FirstName, LastName asc"
Dim cmdStr As New SqlCommand(str, con)
Dim dtreader As SqlDataReader = cmdStr.ExecuteReader()
While dtreader.Read
stringCols.AddRange(New String() {dtreader(0).ToString})
stringCols2.AddRange(New String() {dtreader(1).ToString})
End While
dtreader.Close()
LastNameTF.AutoCompleteCustomSource = stringCols2
FirstNameTF.AutoCompleteCustomSource = stringCols
FirstNameTF.AutoCompleteMode = AutoCompleteMode.SuggestAppend
LastNameTF.AutoCompleteMode = AutoCompleteMode.SuggestAppend
con.Close()
Thank you in advance.