Solved

Using ADO in Visual C++ 7

Posted on 2003-12-03
4
386 Views
Last Modified: 2013-11-20
Hi,

I'm trying to write an application in Visual C++ 7 (Visual Studio .Net) that connects to a access database using ADO.  I'm fairly new to C++/MFC and so i'm following instructions from a book; the problem is that the book is written to use Visual C++ 6 and the Visual C++ 7 GUI has changed such that the instructions don't work.

So my question is how do I insert an ADO Data Grid Control into my application?  My book says to do this:

* Invoke the Components and Controls Galery and select registered ActiveX Controls
* Select Microsoft ADO Data Control Version 6.0 (OLEDB), Click Insert and Confirm.
* The controls are then supposed to be located on the resource editor controls toolbar under MS Ado Data Control.

I cant even find the Components and Controls Gallery to register the ADO components.

I'm sure the answer is right under my nose but any help would be much appreciated

Kind Regards and Thanks in advance
0
Comment
Question by:csuog
  • 3
4 Comments
 
LVL 48

Expert Comment

by:AlexFM
Comment Utility
Right-click on dialog template and select "Add ActiveX control".
0
 
LVL 48

Expert Comment

by:AlexFM
Comment Utility
After this right-click dialog class in the Class View, select "Add - Add Variable". In the dialog check "Control Variable". Select control ID (ID of ADO control inserted to the dialog). Fill variable name and press Finish. Wizard creates wrapper class for this control and adds variable of this class to the dialog.
0
 

Author Comment

by:csuog
Comment Utility
Right, I found this list by trying to customise the dialog editor toolbox.  Now my book, says I should insert the item entitled Microsoft ADO Data Control Version 6.0 (OLEDB), however I can't see this or any other item relating to ADO or a data grid (apart from a VideoSoft FlexArray Control, which I'm pretty sure i'm not looking for). Am I being stupid and looking for the wrong control or do I have to register the ADO Data Controls?

Thanks(again) in advance.
 
0
 
LVL 48

Accepted Solution

by:
AlexFM earned 125 total points
Comment Utility
This control comes with some developer toolkit. Maybe you can find this information in your book. According to this article
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odecore/html/deconinsertingcontrols.asp
it is part of Office 2000 Developer Tools (as most if VC++ developers I don't know what is this). Try to ask in VB area where this control may be found.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now