if(0 == m_list.GetSelectedCount()) { MessageBox("ÇëÑ¡ÔñÄúÒªÐ޸ĵÄÔ±¹¤!!~~~","ÌáʾÐÅÏ¢",MB_ICONASTERISK | MB_OK); return; } int n; CString sql; // sql.Format("delete from serverloadtbl where serverno = %d"); sql = "delete from serverloadtbl where serverno = '"; sql += strServerNo + "'"; n = m_list.GetSelectionMark(); strServerNo = m_list.GetItemText(n,0);
sql = "delete from serverloadtbl where serverno = '"; sql += strServerNo + "'"; //MessageBox(sql); if(m_R->State == adStateOpen) m_R->Close(); m_C->CommandText= _bstr_t(sql); m_C->CommandType=adCmdText; m_C->Parameters->Refresh(); m_C->Execute(NULL,NULL,adCmdUnknown); //m_C->Release(); //m_C->Execute(_bstr_t(sql),NULL,adCmdText,m_P); MessageBox("ɾ³ý³É¹¦","Ìáʾ",MB_ICONINFORMATION | MB_OK); ClearCListCtrl(&m_list);
//m_list.DeleteAllItems(); // // int i_n; // i_n = m_list.GetHeaderCtrl()->GetItemCount(); // // for(int i = 0 ; i <= i_n; i++) // { // m_list.DeleteColumn(0); // }
CAddServerDlg::OnInitDialog();