I have a combobox that I bind to a data table. I then query Active Directory to gety the value to assign to the combo box and I keep getting "Index was out of range Must be no negative and less than the siz of the collection"
Plus it assigns the value and Please Select
for example "United StatesPlease Select"
here is what I am doing
cbUserRegion.SelectedText = ((result.Properties("co")(0)))
If (indexOfSelectedTab = 1) Then
Dim connString As String = "server=MYSERVER;database=MINE; user=USER; password=PASS;trusted_connection=yes"
Dim conn As New SqlConnection(connString)
Dim strSQL As String = "SELECT Country,Value FROM Country"
Dim da As New SqlDataAdapter(strSQL, conn)
Dim ds As New DataSet
.DataSource = ds.Tables("Country")
.DisplayMember = "Country"
.ValueMember = "value"
Catch ex As Exception
Any help would be appreciated