Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Very New to Programming Need advice .
#2
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.
My Blog | My Setup | My Videos | Have a wonderful day.


Messages In This Thread
Re: Very New to Programming Need advice . - by brandonio21_phpbb3_import2 - 05-02-2013, 08:10 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Sockets Programming(Disconnecting from Server) xolara 1 9,429 04-06-2012, 01:47 PM
Last Post: brandonio21

Forum Jump:


Users browsing this thread: 1 Guest(s)