05-02-2013, 08:10 PM
The problem occurs at the beginning of your application. At the very top of your code you say
[code2=vbnet] Public Shared myConnection As New MySqlConnection(connstr)[/code2]
Well, that uses the already set value as the connection string to create the connection. Thus, when you change the values in the textboxes, the connection string may be changing but the connection is not actually refreshing itself.
So, this can be resolved by re-instantiating the connection before it is opened. For example,
[code2=vbnet]Try
            myConnection.Open()[/code2]
Could be replaced with:
[code2=vbnet]Try
myConnection = new MySqlConnection(connstr)
            myConnection.Open()[/code2]
To fix any problems.
I think this will work, atleast. I hope this helps.
[code2=vbnet] Public Shared myConnection As New MySqlConnection(connstr)[/code2]
Well, that uses the already set value as the connection string to create the connection. Thus, when you change the values in the textboxes, the connection string may be changing but the connection is not actually refreshing itself.
So, this can be resolved by re-instantiating the connection before it is opened. For example,
[code2=vbnet]Try
            myConnection.Open()[/code2]
Could be replaced with:
[code2=vbnet]Try
myConnection = new MySqlConnection(connstr)
            myConnection.Open()[/code2]
To fix any problems.
I think this will work, atleast. I hope this helps.