A dialog based application

Posted on 2005-04-26
Last Modified: 2010-04-01
Hello, I would like to create a dialog-based application (Visual C++ 6.0) that connects to a MSACCESS mdb file called contacts.mdb. My dialog based application design has three input fields (name, cell and location) and a listControl with three buttons (Add to database, Delete a record, Search for record, Display all Records) When you fill out the name, cell and location entries and click on the Add to Database Button, I want to add the data to the contacts.mdb. When you type a name in the input field and click on the Delete a record Button, I want to be able to delete the record. When you type a name in the input field and click on the Search for Record, I want to search the contact.mdb and if found()  bring up a list box and display the name, cell and location of that record. When you click on Display all Records, I want to be able to display a list box listing all the records in the contact.mdb.

Can anyone help me get started on this dialog based application please or has anyone did something like this before and would be co kind to send me the example so that I may be able to learn from it to build my on?
Your consideration is greatly appreciated

Question by:cybecks
    1 Comment
    LVL 86

    Accepted Solution

    As in http:Q_21403070.html

     You'll find all MFC databse samples at ("Database Samples"). Especially ("DAOTABLE") seems to be what you want:

    The DAOTABLE sample demonstrates using the MFC Data Access Objects (DAO) database classes to create common database objects: databases, tables, queries, fields, and indexes. This dialog-based application maps the properties of these objects to controls the user can set and/or view. The source code is organized so that most of the database interaction is isolated from the user-interface code. This makes it easy to identify examples of how one can use the MFC DAO database classes.

    In addition to demonstrating the use of the MFC DAO classes, this sample can be a useful tool for creating simple Microsoft Access databases. You can create .mdb files from scratch, create and delete tables and queries, add and delete fields and indexes in the tables, and modify existing queries.

    The direct link to the code/.exe is

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (…
    Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
    The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
    The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

    759 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

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now