The horrible part is ... I had this working!
Then I found a problem with the underlying table, fixed it, and it hasn't worked correctly since ...
What I want to do:
W/in a data grid view, build a list of carriers and show the available networks as a combo box.
If the carrier already exists, its' current network should show as the current value in the combo box.
What I have right now:
The list of carriers and a blank in the combo box.
The combo box is filled with the available networks.
If I select a network, as soon as I go to the next row in the view, the box is blank again.
This is the code I'm currently using:
Private Sub frmCarrier_Load(ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Private Sub LoadNetworkLookup()
'using runtime DataSet and DataAdapters to load combo box
Me.Cursor = Cursors.WaitCursor
Dim strSQL As String = _
"SELECT NetworkID, NetworkTypeName from Network;"
' connect to SQL Server
Dim strConn As New SqlConnection(APC_WirelessConnectionString)
Dim daNetwork As New SqlDataAdapter
Dim cmdNetwork As New SqlCommand(strSQL, strConn)
Dim dsNetwork As New DataSet
Dim dvNetwork As New DataView
cmdNetwork.CommandType = CommandType.Text
daNetwork.SelectCommand = cmdNetwork
'Try Catch Block for error checking
dvNetwork = dsNetwork.Tables(0).DefaultView
.DataSource = dvNetwork
.DisplayMember = "NetworkTypeName"
.ValueMember = "NetworkID"
Catch ex As Exception
Me.Cursor = Cursors.Default
Does any one have a clue what I broke? And better yet, how I can fix it?