?
Solved

Using ADO in Visual C++ 7

Posted on 2003-12-03
4
Medium Priority
?
418 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
ID: 9865865
Right-click on dialog template and select "Add ActiveX control".
0
 
LVL 48

Expert Comment

by:AlexFM
ID: 9865910
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
ID: 9868143
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 500 total points
ID: 9868269
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.
Screencast - Getting to Know the Pipeline
Suggested Courses
Course of the Month14 days, 2 hours left to enroll

807 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