I have a function that returns a datareader. The problem is that in the
function's FINALLY I close the datareader and set it to nothing. But,
BEFORE the Finally I "Return" the datareader (in the Try).
The problem is, by the time it's "returned" it says I already closed it. Any
ideas how I can overcome this? How can I clean up the objects nicely WHILE
returning it back to the caller????
Private Sub x
Dim dr as SqlDataReader
dr = GetDr(...) ' FAILS BECAUSE THE DATAREADER IS CLOSED BY NOW!
Private Function GetDr(...) ...