Solved

Using ADO in Visual C++ 7

Posted on 2003-12-03
4
397 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 125 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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
sumNumber challenge 16 138
while loop over for loop 7 115
NotAlone Challenge 20 84
How to convert MFC::CString to UTF8 wchar_t* 10 279
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…
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
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.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

860 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