Solved

DBGrid Control in MFC

Posted on 1998-06-04
2
741 Views
Last Modified: 2013-11-19
I would like to use a DBGrid Control in a MFC dialog box application but I don't know how to make connection with a database, that is to bound data in columms of DBGrid. When this control is used in VB, it needs a Data control. The Data control can connect with database then DBGrid can find data source. However, Data Control is belong to VB. I can't find it when I insert an ActiveX control. Anyone can tell me how to do in MFC?
hbh
0
Comment
Question by:hbh
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 1

Expert Comment

by:dkremer
ID: 1315999
Use the Microsoft Remote Data Control instead.

0
 
LVL 1

Accepted Solution

by:
chacko earned 50 total points
ID: 1316000
Please refer MDIBIND example come with MSVC++ CD.

Create a RDC(Remote Data Control) in a modeless dialog. Create a datasource thru ODBC32 and connect this data source to the RDC. Now create your DBGrid and say the source is this RDC. Remember, do in a modeless dialog. Modal dialog behaviour is unpredictable.

ODBC data source -> RDC -> DBGrid.

You can create these controls from 'Insert' menu item under 'Project' in MSVC++.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
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.
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…

728 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