Posted on: 5/29/2014 7:29:45 PM | Views : 603

I am using code below to open and dispose connection.
     -----------------------
       Dim mySQLCommand As New SqlCommand("sp_addorder", myConn)
        mySQLCommand.CommandType = CommandType.StoredProcedure
        -----
         Using myConn
            Try
                myConn.Open()
                mySQLCommand.ExecuteNonQuery()
                myConn.Close()
              Catch ex As SqlException
           Finally
...

Go to the complete details ...