
Converting Data Access Objects to Classes for Easier Access
Quote:
>You can set up a private collection class to hold all your tables.
>Then set up the fields as private properties of each table class
>in the collection. All you need is a Private declaration and Property
>Get/Let Functions for each field's value. But why go back to bound
>controls? If you go to the work of mapping your data into
>classes, its not that much more work to programmatically
>bind them to plain(faster) labels, textboxes and listboxes.
>Leave the datacontrol behind in the dust...
This is similar to what I have done and I agree, it is faster.
I have 16 form windows, each for representing records from a different
table. They contain as little code as possible, just a few procedures
specific to the type of record and event handlers which call global
routines. The rest of the code is contained in a class module which
can load a record from any of the 16 tables, provide field values to a
form, accept field changes, perform validation checks (unique to each
table), and save the record.
However, I do not have a suitable way to replace the data control when
it is used as a row source for the data-bound list control and combo
box.
-----.sig under construction next three lines-----
Wayne Bundrick