I have a question about best practices as far as opening and closing the database connetion in my app. Currently I am opening and closing each time the database is accessed with a query or update. Should I be doing this? It’s a lot of opens and closes. Or maybe I should just open when the user signs on and close when he/she signs off. Or some other idea? Do you have any ideas or suggestions for me on this? I'm using VB.net to access an Access database.
kentuckyjoe
0
Newbie Poster
Recommended Answers
Jump to PostIt depends on where the database is and how heavily it is being used. If the database is on a server and it is heavily used by a large number of people/applications concurrently then best practice is to keep your connection closed until you need it. Then open it, use …
All 4 Replies
Reverend Jim
4,780
Hi, I'm Jim, one of DaniWeb's moderators.
Moderator
Featured Poster
kentuckyjoe
0
Newbie Poster
kentuckyjoe
0
Newbie Poster
Reverend Jim
4,780
Hi, I'm Jim, one of DaniWeb's moderators.
Moderator
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.