Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


How to show data from database on Combo Box or List Box in Visual C++

Posted on 1999-09-01
Medium Priority
Last Modified: 2013-11-20
Please somebody teach me,how to use Visual C++ to show data from database on Combo Box or List Box.
And please tell me the detail,contain the code how to write.
What should I use from Library,and what should I study in the MSDN.
Please,Thank you.
Question by:lky090199
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

Expert Comment

ID: 2016719
what database u have?
do u know how to open/read the record into a buffer ?

Accepted Solution

Andrian earned 40 total points
ID: 2024788
Acces Database
      CDaoDatabase *pDatabase = new CDaoDatabase;
      if (pDatabase != NULL)
            CDaoRecordset * pRecord=new CDaoRecordset(NULL);
            CDaoQueryDef * pRequetSQL=new CDaoQueryDef(pDatabase);
            COleVariant vFieldName;
            //strRequet.Format("SELECT RefFaute,Valeur FROM REGLE_FAUTE WHERE TypeFaute=\"%s\" ",strTypeFaute);
                  pRecord->Open( pRequetSQL);
            CString strField;
      delete pRequetSQL;
      delete pRecord;

Author Comment

ID: 2026510
I can't understand about where the code to write.
In Visual C++,Should I write it in the Combo box or the DocumentView???

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
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.
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

660 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