jayplus707
Programmer
This is a general object-oriented design question: How would you design your application where each form was an object and needed a connection to the database? Does it make sense to make the connection and other data part of a connection class that is external to each form class? Or would you somehow incorporate the connection as part of each form class?
I was going to design it this way: have 1 to n form objects, but have a single connection object that all the form objects have access to. Is this the better way to design it?
If you know .NET, how would you do this in C#? Each form in C# is itself a class. Where would you create the connection object? Because if you create the connection object in a form class, the connection object is no longer "global" to the other form objects. Have I confused you? Because I am confused now......Thanks.
I was going to design it this way: have 1 to n form objects, but have a single connection object that all the form objects have access to. Is this the better way to design it?
If you know .NET, how would you do this in C#? Each form in C# is itself a class. Where would you create the connection object? Because if you create the connection object in a form class, the connection object is no longer "global" to the other form objects. Have I confused you? Because I am confused now......Thanks.