Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Very New to Programming Need advice .
#3
Thanks for the assistance Brandon , that indirectly worked , however i had to add an extra line which seemed to help also.

Code:
connstr = "Server=" & KryptonTextBox1.Text & ";Database=" & KryptonTextBox2.Text & ";Uid=" & KryptonTextBox3.Text & ";Pwd=" & KryptonTextBox4.Text & ";"
            myConnection = New MySqlConnection(connstr)
            myConnection.Open()

Needless to say that you pointing out that i hadnt re-instated the connection made me realise what i had done. Thanks man .

What i now want add is that if any of connection string textboxes is empty then the connect button isnt visable. so i guess that :

Code:
If KryptonTextBox1.Text = Nothing Then
            KryptonButton1.Visible = False
        Else
            KryptonButton1.Visible = True

would be correct . Only i dont really understand where it should appear in my code. Can you point me in the right direction .
I did have it in the Form load sub and the button isnt visable , but when i enter content to the textbox it doesnt reappear. I dont fully understand how the code is executed and it what order i guess.
Cheers again brandonio you have inspired an old school BBC Basic programmer to pick up where i left off twenty yrs ago lmao..


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

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

Forum Jump:


Users browsing this thread: 1 Guest(s)