cheeonn
asked on
visual c++ database building
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::Do Filter(CSt ring 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);
}
}
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::Do
{
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);
}
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER