My VB.Net / Windows program starts with a log in screen. When the form loads, it gets all the user names and sets it as AutoCompleteStringCollecti
on. The sub procedure is below:
If I go through the code line by line while looking at the MySQL WorkBench, the line:
opens a connection but the lines
MyConnection.close or MyConnection.dispose doesn't close off the connection.
I use the same pattern in other queries without any problems.
Private Sub GetListOfUserNames()
Dim myConnection As MySqlConnection
myConnection = New MySqlConnection(strConnection)
Dim daUser As New MySqlDataAdapter("Select strUsername from Users order by strUsername asc", myConnection)
Dim dsUser As New DataSet
For i As Integer = 0 To dsUser.Tables(0).Rows.Count - 1
Catch ex As Exception
MsgBox("Error getting Username Information.")