Another question i asked..
Closing a conneciton in the "unload" method
Has piqued my interest in the subject. When relating to asp.net/c# I understand that there is an underlying expense in opening/closing database connections, I'm interested in whether it's more expensive to either...
- Open DB connection at the start of a request
- Do several operations
- close connection at end or the request
vs
- Open connection directly before any database command
- Close straight away (thus opening and closing connections several time during a request)
If anyone could provide any insight, or point me in the direction of some reading material on the matter, that would be awesome.