Converting Data Access Objects to Classes for Easier Access 
Author Message
 Converting Data Access Objects to Classes for Easier Access

Does anyone know of a tool for VB 4.0 that can do the following.
Take a DAO, e.g. Data Control bound to a Database and a Table,
and convert its' fields into members of a Class or Object which
can be manipulated.  Then the Object can be written back to the
bound Database table (either New record, or a modified record).

I'm hoping to make it easier to work with Table field data, outside
of the Data Access Object coding method that is normally required
to work with external Database data.

Thanks to all replyees.

Fred Zimmerman

Sat, 22 Aug 1998 03:00:00 GMT  
 Converting Data Access Objects to Classes for Easier Access


>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

-----.sig under construction next three lines-----
Wayne Bundrick

Mon, 24 Aug 1998 03:00:00 GMT  
 [ 2 post ] 

 Relevant Pages 

1. Access 2000 converted to Access 97 report query data type errors

2. HELP:Accessing a class object in another class!

3. HELP:Accessing a class object in another class!

4. Anyone know of a software to convert from Access to Oracle easy

5. microsoft access version 7 - data access object problem

6. convert Access 2 in Access 95 and Access 97

7. Data Source Class to access Data Environment

8. Simplified Data Access ie Easy as Access2002

9. Trouble removing Class Object from Code Editor in Access

10. Access:Converting embedded object into a file

11. Class Module/Object in Access 95

12. Accessing Class and Structure info from a COM object Problem


Powered by phpBB® Forum Software