Bafcom
April 20th, 2005, 02:03 PM
How to connect the visual c++ MFC front phase with the Microsoft Access and make them work well together.I have created tables using Microsoft Access and now I have to manipulate(insert,delete,modify) those tables using MFC as a front phase.
I am new at this so where do I start?@!
ahoodin
April 21st, 2005, 04:31 PM
Well I suggest going with ODBC.
This will allow you to switch your back end to SQL Server or MySQL at a later date, or any other DB that has an ODBC driver.
One method of going about it is to derive a class from CRecordset using the MFC Wizard, but my main complaint with this method is that when your database schema changes this does not. You will need to look at making a connection string and check out DSNs.
ADO has been gathering alot of thunder these days, and here is a CG article for you complete with source code:
http://www.codeguru.com/Cpp/data/mfc_database/ado/article.php/c6729/
ahoodin
PS If this post helps, dont forget to rate. Just click the scale icon and click approve.