eramgarden Posted April 26, 2006 Posted April 26, 2006 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? Quote
Administrators PlausiblyDamp Posted April 26, 2006 Administrators Posted April 26, 2006 Something like Microsoft's Data Application Block may be a starting point for this kind of design. Also this is mentioned in passing in the thread over at http://www.xtremedotnettalk.com/showthread.php?t=96168 Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
eramgarden Posted April 26, 2006 Author Posted April 26, 2006 is this a typical design that more experienced developers follow? what are other options besides what I do and besides having a "database access class" designed? For example, what would u (and other experienced developers on this forum) suggest? Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.