Classes derived from CRecordset and CDaoRecordset 
Author Message
 Classes derived from CRecordset and CDaoRecordset

Hello

I created some classes in VC++ to help solving the following problem.

Suppose we have three related tables: Customers, Orders, Order Details.
Let's imagine, for example, that a customer makes a new order to request
some products at certain conditions. In a hypothetic application we are
projecting, we have decided that, after having selected the customer (that
we suppose for simplicity already in the Database), we must click the button
New order, which opens a form to be filled in with the order data. In the
form, a button New Detail is needed, in order to add, one at a time, the
different details of this order. After having added all the details and
filled in the form, we can save everything clicking on the button Save
Order.
Such a project seems to be quite reasonable, but at the implementation time
we would meet with a difficulty: if the details are saved in the Database
only when the order is saved, where should they be memorized in the
meanwhile?
It is evident that we need to define an auxiliary structure where the
details data can be temporarily memorized, and where to pick out when the
order is saved in the Database.
The problem would become more complicate if we decided, for example, to save
more than one order at a time. In this case we should move the button Save
Order at the customer's level, transforming it in a button Save Orders in
charge of saving in the Database the N newly inserted orders. This time a
two level auxiliary structure would be necessary, in order to temporarily
memorize each order with the corresponding details. More levels we want to
unify, more complex the management of the needed auxiliary structure would
become.

I published something about it ( http://www.*-*-*.com/ ), and I'd
like to know the opinion of anybody about them, and about the discussed
matter. There you can also find a sample about how the classes work, so if
you are able to run it, please let me know (OK, even if you are not
able...).

Thanks



Fri, 03 Jan 2003 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Leaving a CDaoRecordset object as a derived class member

2. NTDLL.DLL Access Violation in CRecordset-derived class?

3. Derived CRecordset class questions

4. Derived CRecordset or standalone CODBC class ?

5. Can't create new record using CRecordset derived class

6. Enumerated field access thru CRecordset-derived class

7. My CRecordset derived class doesn't work in Release mode

8. Derived Class off CRecordSet

9. Problem deriving a class from CRecordSet

10. Can't derive class from CRecordSet

11. (mfc) deleting an instance of a class derived from the CRecordset

12. CRecordset derived class

 

 
Powered by phpBB® Forum Software