////////////////////////////////////////////////////////////////////// 【程序编程相关:Eric的超高效数据分页(图示+代码) 】
【推荐阅读:Eclipse3.0+Myeclipse】
//日期:2003.12 【扩展信息:理解 Linux 配置文件】//功能:弹出修改记录窗口//////////////////////////////////////////////////////////////////////void cmaindlg::onradiomod() { // todo: add your control notification handler code here m_database.close();//本对话框断开与数据库的连接 cmodifydlg dlg; dlg.m_database.open(_t("addresslist")); int i=m_ctrlperson.getselectionmark(); cstring strsql; int id=atoi(m_ctrlperson.getitemtext(i,0)); cpersonset m_recordset; cdbvariant varvalue; if(i==-1) { messagebox("请选择一条要修改的记录!","提示",mb_ok|mb_iconinformation); } else { int temp=0; strsql.format("select * from person where id=%d",id); m_recordset.open(afx_db_use_default_type,strsql); m_recordset.getfieldvalue(temp,varvalue); dlg.m_modid=varvalue.m_lval;m_recordset.getfieldvalue(1,varvalue);
dlg.m_modname=varvalue.m_pstring->getbuffer(1);m_recordset.getfieldvalue(2,varvalue);
dlg.m_modsex=varvalue.m_pstring->getbuffer(1);... 下一页