bugtracker911
New member
- Joined
- Aug 26, 2006
- Messages
- 4
- Programming Experience
- Beginner
How can I prevent writing repetitive code like connecting to the database, quering, inserting data etc. All examples I have found keep repeating the connection string to open the database, which makes your code messy.
What I would like is a wrapper or something, to keep all the db functions together, and to make sure that all open connections are closed properly after querying. Nothing too complicated, I could try and knock something up myself, but I'm new to .net, and I want to get it done right.
Any help appreciated
Hope this makes sense.
What I would like is a wrapper or something, to keep all the db functions together, and to make sure that all open connections are closed properly after querying. Nothing too complicated, I could try and knock something up myself, but I'm new to .net, and I want to get it done right.
Any help appreciated
Hope this makes sense.