05-02-2013, 10:54 PM
Thanks for the assistance Brandon , that indirectly worked , however i had to add an extra line which seemed to help also.
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 :
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..
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..