void CLMSDlg::OnButtonlogin()
{
// TODO: Add your control notification handler code here
CMainsystem dlg;
CADOConn adoconn;
CString sqlstr,str;
int countcleck;
countcleck=((CComboBox*)GetDlgItem(IDC_COMBOCLECK))->GetCurSel();
((CComboBox*)GetDlgItem(IDC_COMBOCLECK))->GetLBText(countcleck,str);
UpdateData(TRUE);
if(m_user.IsEmpty())
{
MessageBox("用户名不能为空","错误",MB_ICONERROR);
GetDlgItem(IDC_EDITUSER)->SetFocus();
}
try
{
sqlstr.Format("select *from usertable where uusername='%s' and uuserpassword='%s' and uusercleck='%s'",m_user,m_password,str);
_bstr_t vSQL;
vSQL=(_bstr_t)sqlstr;
_RecordsetPtr m_recordset;
m_recordset=adoconn.GetRecordSet(vSQL);
CString str1,str2,str3;
str1=(LPCSTR)(_bstr_t)(m_recordset->GetCollect("uusername"));
str2=(LPCSTR)(_bstr_t)(m_recordset->GetCollect("uuserpassword"));
str3=(
经验!C++核心技术 “登录实现”
最新推荐文章于 2022-05-05 18:45:57 发布
void CLMSDlg::OnButtonlogin(){ // TODO: Add your control notification handler code here CMainsystem dlg; CADOConn adoconn; CString sqlstr,str; int countcleck; countcleck=((CComboBox*)GetDlgItem(IDC_COMBOCLECK))->GetCurSel(); ((CComboBox*)GetDlg.
摘要由CSDN通过智能技术生成