全文预览

数据库课程设计报告

上传者:蓝天 |  格式:docx  |  页数:18 |  大小:0KB

文档介绍
should return FALSEР}Р教师信息查询函数:Рvoid CTecinfoDlg::OnTsearch() Р{Р?// TODO: Add your control notification handler code hereР?ADOConn m_AdoConn;Р?m_AdoConn.OnInitADOConn();Р UpdateData(true); Р?//设置SELECT语句Р?_bstr_t vSQL;Р?vSQL="SELECT * FROM teacher WHERE t_id ='" + m_tid +"'or"+ " t_name='" + m_tname +"'";Р?//执行SELETE语句Р?_RecordsetPtr m_pRecordset;Р?m_pRecordset = m_AdoConn.GetRecordSet(vSQL);Р?//返回各列的值Р?while (m_pRecordset->adoEOF == 0)Р?{Р Р m_tlist.InsertItem (0,(LPCTSTR)(_bstr_t)m_pRecordset->GetCollect("t_id"));Р m_tlist.SetItemText(0,1,((LPCTSTR)(_bstr_t)m_pRecordset->GetCollect("t_name")));Р m_tlist.SetItemText(0,2,((LPCTSTR)(_bstr_t)m_pRecordset->GetCollect("t_sex")));Р m_tlist.SetItemText(0,3,((LPCTSTR)(_bstr_t)m_pRecordset->GetCollect("t_department")));Р m_pRecordset->MoveNext();

收藏

分享

举报
下载此文档