how to close connection/datareader when using SqlDataSource or ObjectDataSource
问题 during beta testing we discovered connection pooling error messages . Therefore I have been going through the code and closing down the SqlDataReader objects wherever they have been left unclosed. What I need to know is how to close a datareader (or if there is a need at all to close) that is specified in the SelectStatement attribute of the SqlDataSource or ObjectDataSource tags. Could there be connection leak if they are not handled? Thanks in advance ! 回答1: I tend to use the "using"