?
Solved

visual c++ database building

Posted on 1998-08-09
2
Medium Priority
?
310 Views
Last Modified: 2012-06-21
What is wrong with the code here? the part on: (CString str = col + " =  ' "+  dlg.m_filterValue + ' ";
Written something about
{ error C2679: binary '+' : no operator defined which takes a right-hand operand of type 'class CEdit' (or there is no acceptable conversion
void CSignatureDatabaseView::DoFilter(CString col)
{
    CFilterDlg dlg;
    int result = dlg.DoModal();
    if (result == IDOK)
    {
        CString str = col + " = '"+  dlg.m_filterValue + "'";
        m_pSet->Close();
        m_pSet->m_strFilter = str;
        m_pSet->Open();
        int recCount = m_pSet->GetRecordCount();
        if (recCount == 0)
        {
            MessageBox("No matching records.");
            m_pSet->Close();
            m_pSet->m_strFilter = "";
            m_pSet->Open();
        }

 
      UpdateData(FALSE);

    }
}
0
Comment
Question by:cheeonn
[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
 

Author Comment

by:cheeonn
ID: 1169770
Really desperately need an answer....thanking you in advance..thank you...thank you....thank you...thank you..
0
 
LVL 6

Accepted Solution

by:
snoegler earned 60 total points
ID: 1169771
Your 'm_filterValue' has been selected as a 'CEdit' control, not as a 'CString' as you expect in
the line which causes the error. Either you select it as a 'CString' (by deleting the member
variable and adding it as a 'CString' exchange type) or you replace
m_filterValue with m_filterValue.GetText().
(BTW: you should post MFC questions in the MFC section)
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

752 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