T
Tony Van
I'm slogging my way up the learning curve for VB.net, and I
have a conceptual question regarding classes.
I have a name and address database and I'm writing a
program to display names, phone numbers, that kind of stuff.
Eventually, I'll expand the database into a generic
name/address db to use in other programs to hold clients and
contractors as well as the original Rolodex application.
I constructed a class to handle database access. The
properties of the class are the database fields, and there
are methods to AddNew, Update, Delete and Find a database
entry.
All well and good.
Sometimes however, the user will need to get a number of
entries, for example, when he/she searches on all entries in
a certain state. The result set is put into a list box for
selection of a single entry to view (and perhaps edit).
My questions is: Should this multiple record searching be
done outside the class? Is there anyway to have the class
do this without a lot of overhead?
If I do this outside the class are the OOP police going to
come for me? I'm joking, but I really would like the class
to be reusable over a number of applications.
I don't need code, just a shove in the right direction.
Many thanks.
Tony
have a conceptual question regarding classes.
I have a name and address database and I'm writing a
program to display names, phone numbers, that kind of stuff.
Eventually, I'll expand the database into a generic
name/address db to use in other programs to hold clients and
contractors as well as the original Rolodex application.
I constructed a class to handle database access. The
properties of the class are the database fields, and there
are methods to AddNew, Update, Delete and Find a database
entry.
All well and good.
Sometimes however, the user will need to get a number of
entries, for example, when he/she searches on all entries in
a certain state. The result set is put into a list box for
selection of a single entry to view (and perhaps edit).
My questions is: Should this multiple record searching be
done outside the class? Is there anyway to have the class
do this without a lot of overhead?
If I do this outside the class are the OOP police going to
come for me? I'm joking, but I really would like the class
to be reusable over a number of applications.
I don't need code, just a shove in the right direction.
Many thanks.
Tony