I want to create a global function to use throughout my application. Let say it's about the connection to the database.
My code that i plan to use in my global function is:
myConnection = New SqlConnection("...........")
myConnection.Open()
So that I can call it to use in every form throughout my application. This can make me easy to edit the connection later.
Could anyone help me show how to define this global function and how to call this function in the form.
Best regard,