V
venkat.murthy
While retrieving multiple rows from a dataset, we go for a datareader.
Following best practices, i had implemented the
commandbehaviour.closeconnection to ensure that associated connection is
closed, when datareader is closed.
But, i need to return a datareader from a method in class one to a method in
class two.
Can i close the connection object in class one, and still continue to use
the datareader object in class two.
What would be the impact if i close the datareader in class two, without
closing connection in class one.
Any code snippet on the performance wise would prove great help.
Regards,
V
Following best practices, i had implemented the
commandbehaviour.closeconnection to ensure that associated connection is
closed, when datareader is closed.
But, i need to return a datareader from a method in class one to a method in
class two.
Can i close the connection object in class one, and still continue to use
the datareader object in class two.
What would be the impact if i close the datareader in class two, without
closing connection in class one.
Any code snippet on the performance wise would prove great help.
Regards,
V