Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

DBGrid Control in MFC

Posted on 1998-06-04
2
Medium Priority
?
763 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 100 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
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…
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.
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…

610 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