DAO databases and DDX data exchange

I am writing a DAO database app, created with the AppWizard (MS Vis C++ 5.0).  At some point middevelopment, I had to make a change to the underlying MS Access .mdb, adding a text field. I have 2 questions pertaining to the DDX routines...

1) What is the best way to ensure the integrity of my DAO app when I change the underlying database?  Should this be done somehow with the class wizard?  Or should I just manually make changes to CRecordSet.h, DoFieldExchange(), DoDataExchange(), etc?
2) I need to perform certain operations whenever a record is updated.  Where can I intercept the user's pushing of the record navigation buttons in the CRecordView?  Is it safe to add code to the end of the DoDataExchange() function? (If not, where should this code be added?)

This question may be worth a bit more than 100 pts, but that's all I have!  Thanks a lot in advance...
LVL 7
Bill NolanOwner, Lead Technology ProgrammerAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
inprasConnect With a Mentor Commented:
Hi
"1) What is the best way to ensure the integrity of my DAO app when I change the underlying database?  Should this be done somehow with the class wizard?  Or should I just manually make changes to CRecordSet.h, DoFieldExchange(), DoDataExchange(), etc? "

U need not do it manually.
Go to class wizard
click on member variables tab
Click the button Update columns.
Select UR database and tables to be updated
click ok in the screen and when U come back
click on the button Bind All this will update UR recordset class and respective DDX functions

2.U can have UR member function mapped whenever User pushes the buttons next prev etc GO to class wizard add these member functions to the toolbar or menu items.
and if U write a small amount of code in DDX functions there is nothing wrong in it.
Hope this helps
0
 
Bill NolanOwner, Lead Technology ProgrammerAuthor Commented:
Thanks
0
All Courses

From novice to tech pro — start learning today.