Closing a connection that is being passed in
Hi all I am hoping to get a bit of clarification on something. I am working with a database connection where there are methods that require information from other methods and so on. I am curious which would be better to have each method waiting with an open connection or to pass the connection as a parameter into the called method.
If passing the connection in makes sense I am assuming that each method will still be responsible for closing the connection on their own - would that be the right thought ?
thanks in advance
(The reason I put it here and not in the DB forum is I also wanted to get more than 1 or 2 thoughts about which method would be favoured more).

