DataReader Question

  • Thread starter Thread starter Paul W
  • Start date Start date
P

Paul W

What is the best way to fix this...

I was given a piece of code that uses a datareader to pass data.
Function X calls Function Y and Function Y returns a datareader with
the data that Function X needs.

Function X closes the datareader when it is done, but the connect in
Function Y is never closed, no hook is passed from Y to let X close it.

What is the best way to fix this? Pass a hook to X so X can close the
connection declared in Y? Is there another way (without changing a lot
of code)?

Thanks,

Paul W
 
I have that and the connection seems to stay open, maybe I missed a
DataReader.close somewhere...

Thanks,

Paul W
 
Back
Top