Hello, I've been working on this for three days now and I can't seem to get my listbox to populate...please help. I'm connecting to an sql database. Where am I going wrong?
Dim cmd As New SqlCommand("SELECT DISTINCT natureport FROM rates ORDER BY natureport", conn)
Dim da As SqlDataReader
conn.Open()
da = cmd.ExecuteReader(CommandBehavior.CloseConnection)
da.Read()
If da.HasRows Then
ListBox1.Items.Add(da.Item("natureport"))
End If
da.Close()
conn.Close()