I have tried it, it is some great!
I have a question:
When we use ADO.NET, we must open a connection before use
Command.ExecuteReader() to get a DataReader, and then close the conneciton
after go throught the DataReader.
When we use Data Access Application Block, we can use
SqlHelper.ExecuteReader to get a DataReader.
Do we need to close a connection after that?
I have tried it, it is some great!
I have a question:
When we use ADO.NET, we must open a connection before use
Command.ExecuteReader() to get a DataReader, and then close the conneciton
after go throught the DataReader.
When we use Data Access Application Block, we can use
SqlHelper.ExecuteReader to get a DataReader.
Do we need to close a connection after that?
You don't have to close the connection in either case, but it is good
practise if you're using connection pooling
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.