主题:请教关于数据库查询的问题
void CSquery::OnOk2()
{
UpdateData(1);
if(m_recent==_T(""))
{
MessageBox("[查询最近]不能为空!","错误",MB_OK);
return;
}
BOOL hasRec = FALSE;
int exe = 0;
_RecordsetPtr m_crecordset1;
_RecordsetPtr m_crecordset2;
int m_recent1;
m_recent1=atoi(m_recent);
int shumu;
shumu=pApp->m_database.GetRecordCount(m_crecordset1);
///////////m_stsql="SELECT* FROM data WHERE shumu - "+m_recent1+"<index<shumu";
exe=pApp->m_database.ExecuteSQL(m_stsql,m_crecordset2);
hasRec=pApp->m_database.HasRecord(m_crecordset2);
if(hasRec)
{
m_zhuanzhejidlg.RefreshList(m_stsql);
CDialog::OnCancel();
}
else
{
MessageBox(" 数据库中的内容不够","错误", MB_OK);
}
}
G:\vc练习\复件 9.6 早\Squery.cpp(81) : error C2110: cannot add two pointers
画杠线的地方的问题,请指教是什么原因呢?
{
UpdateData(1);
if(m_recent==_T(""))
{
MessageBox("[查询最近]不能为空!","错误",MB_OK);
return;
}
BOOL hasRec = FALSE;
int exe = 0;
_RecordsetPtr m_crecordset1;
_RecordsetPtr m_crecordset2;
int m_recent1;
m_recent1=atoi(m_recent);
int shumu;
shumu=pApp->m_database.GetRecordCount(m_crecordset1);
///////////m_stsql="SELECT* FROM data WHERE shumu - "+m_recent1+"<index<shumu";
exe=pApp->m_database.ExecuteSQL(m_stsql,m_crecordset2);
hasRec=pApp->m_database.HasRecord(m_crecordset2);
if(hasRec)
{
m_zhuanzhejidlg.RefreshList(m_stsql);
CDialog::OnCancel();
}
else
{
MessageBox(" 数据库中的内容不够","错误", MB_OK);
}
}
G:\vc练习\复件 9.6 早\Squery.cpp(81) : error C2110: cannot add two pointers
画杠线的地方的问题,请指教是什么原因呢?