Solved

DBGrid Control in MFC

Posted on 1998-06-04
2
735 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

Suggested Solutions

Title # Comments Views Activity
Perl Awk Need Help 3 145
List out all word 7 350
dog bark java program 15 130
Excel file not created as expected 7 105
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

734 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