I have some experience of developing in
VB but this was quite a while ago.
What I am saying is that you either close each connection after you use them (which in this case would be inefficient) or keep the connection open and simply keep reusing this and at the very end of the script close the connection to the database. This is how I develop in PHP and I am sure that this is also permitted in
VB.
The code from what I can read is opening a connection each time without previously closing the first connection.
What I suggest you do is to comment out from "SQL2 = ..." down to the last End Try statement. Include a Close and Dispose at the end before the last statements:
Btnsave.Enabled = False
btnedit.Enabled = True
and test this out.
If this works it means one of two things: a) the close and dispose is needed at the end of the procedure or b) that you will need to use unique names for the different elements that you are using i.e. myCommand.