• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 908
  • Last Modified:

ADO using MFC

Dear Experts,
 Would you please provide me with an example or link of how can I use ADO with MFC?
Thank you
0
hvelasco
Asked:
hvelasco
3 Solutions
 
DanRollinsCommented:
Please check out this post:
       http:/Cplusplus/Q_20836969.html#10014953

It shows how to get started with ADO in a C++ program.  It assumes that you have a database already layed out that you can access from SQL Query Analyzer or other interactive database tool.

That example uses a console-style wrapper (i.e., a main() fn and all that) -- the idea being that using that format makes it clear that that is *all* of the steps (nothing gets done behind the sceness by the ClassWizard, etc.)

For instance, you can use the same sequence in a button handler in an MFC dialog-based application.

=--==-=--=
Incidently, I prefer to use the ODBC-based MFC objects CDatabase and CRecordset (over the basically manual-coding of ADO access) becasue they are so simple and flexible and the CLassWizard provides a very easy way to create internal memroy structures that exactly echo the data in the database.

-- Dan
0
 
mahesh1402Commented:
Also

Sample: ADOVC1 Simple ADO/VC++ Application
http://support.microsoft.com/kb/220152/EN-US/ <===

and 'ActiveX Data Objects (ADO) Frequently Asked Questions'

http://support.microsoft.com/kb/q183606/ <===

http://www.codersource.net/ado_mfc_clistctrl.html <==


-MAHESH
0
 
AndyAinscowCommented:
Here is a good set of wrapper classes for ADO
www.codeproject.com/database/caaadoclass1.asp
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now