Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
|
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 12th, 2004, 10:54 PM
Authorized User
 
Join Date: Oct 2004
Posts: 72
Thanks: 0
Thanked 0 Times in 0 Posts
Default dealing with CLASS IN NTIER

hi guys ,
i have a client table, genheader table ,gendetails table
i made a class for each table which has open and close the connecion inside it

in my form, combobox is binded to cleint table,
other textbox and dtpicker is binded to genheader class and datagrid into gendetails class, for each class that i used im opening and closing it ,my question is which is better in performance and code reusability the three class which has its own open/close connection or i will combine all these and to have one class only with 1 open/close connection?
m designing acctng system in ntier using vb.net
tnx in advance

 
Old October 12th, 2004, 11:26 PM
Friend of Wrox
 
Join Date: Feb 2004
Posts: 177
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I think it is better ou use 1 connection to get data, but it is always a trade-off. Also think of the class as a relation so you can have better code reusability and try to model the relation.



It is not how much we do,
but how much love we put in the doing.

-Mother Theresa





Similar Threads
Thread Thread Starter Forum Replies Last Post
dealing with drop downs lisabb ASP.NET 2.0 Basics 5 May 28th, 2007 12:29 AM
Dealing with empty properties Quick209 Java Basics 4 June 5th, 2006 08:03 PM
Dealing with web.config richpopeye ADO.NET 1 August 31st, 2004 04:58 PM
Dealing with DBNull jaucourt VB.NET 2002/2003 Basics 3 January 16th, 2004 10:59 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.