编译时出现参数不足,期待是2,求救!
以下是代码:voidCLOGINDLG::OnOK(){Flag=0;//TODO:AddextravalidationhereUpdateData(TRUE);m_pL...
以下是代码:
void CLOGINDLG::OnOK()
{
Flag = 0;
// TODO: Add extra validation here
UpdateData(TRUE);
m_pLoginbase.Open(_T("LIBRARY"),FALSE,FALSE,_T("ODBC;UID=LOGIN"));
CLoginSet m_Loginset(&m_pLoginbase);
try
{
if(m_Loginset.IsOpen())
m_Loginset.Close();
m_Loginset.m_strFilter.Format("m_CARD_ID = '%s'and m_PASSWORD = '%s'",m_Card_ID,m_Password);
m_Loginset.Open(CRecordset::snapshot,_T("Select * from LOGIN"));
if(m_Loginset.IsEOF())
{
m_Loginset.Close();
AfxMessageBox("密码或卡号不正确,请重试!");
return;
}
else
{
m_Loginset.Close();
AfxMessageBox("密码正确,登录成功!");
Flag = 1;
}
}
catch(CDBException *e)
{
e->ReportError();
return;
}
CDialog::OnOK();
} 展开
void CLOGINDLG::OnOK()
{
Flag = 0;
// TODO: Add extra validation here
UpdateData(TRUE);
m_pLoginbase.Open(_T("LIBRARY"),FALSE,FALSE,_T("ODBC;UID=LOGIN"));
CLoginSet m_Loginset(&m_pLoginbase);
try
{
if(m_Loginset.IsOpen())
m_Loginset.Close();
m_Loginset.m_strFilter.Format("m_CARD_ID = '%s'and m_PASSWORD = '%s'",m_Card_ID,m_Password);
m_Loginset.Open(CRecordset::snapshot,_T("Select * from LOGIN"));
if(m_Loginset.IsEOF())
{
m_Loginset.Close();
AfxMessageBox("密码或卡号不正确,请重试!");
return;
}
else
{
m_Loginset.Close();
AfxMessageBox("密码正确,登录成功!");
Flag = 1;
}
}
catch(CDBException *e)
{
e->ReportError();
return;
}
CDialog::OnOK();
} 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询