eramgarden
Contributor
- Joined
- Mar 8, 2004
- Messages
- 579
I've been reading this aeticle:
http://www.developer.com/design/article.php/10925_3347291_2
to get a better grip on OO design and thoughts. On this section of the article, it talks about "a database access class". It has DB open, close, etc.
question: What I've done in my small asp.net/vb.net app is to repeat the conenction string, opening of database, closing it, etc in each subroutine/function
So how can I avoid this reapeating of code..actually build a class to do all the DB stuff as this article suggests? anyone with a good example i could look at it?
http://www.developer.com/design/article.php/10925_3347291_2
to get a better grip on OO design and thoughts. On this section of the article, it talks about "a database access class". It has DB open, close, etc.
question: What I've done in my small asp.net/vb.net app is to repeat the conenction string, opening of database, closing it, etc in each subroutine/function
So how can I avoid this reapeating of code..actually build a class to do all the DB stuff as this article suggests? anyone with a good example i could look at it?