//插入一条求职者数据到数据库里 void CRegisterDialog::insertJobSeekers(CString name, CString sex, CString age, CString EID, CString prof, CString workexp, CString areacode, CString industryid, CString salary, CString email, CString pwd,CString smtpserver, int smptport,CString eusername,CString epassword,CString contentfilename,CString attachmentfilen) { CString strSQL; strSQL.Format(_T("insert into JobSeekers(Name,Sex,Age,EID,Professional,WorkExperience,AreaCode,IndustryID,Salary,Email,PWD,SmtpServer,SmtpPort,EUserName,EPassWord,ContentFileName,AttachmentFileName) values (\'%s\',\'%s\',%s,%s,\'%s\',%s,\'%s\',%s,%s,\'%s\',\'%s\',\'%s\',%d,\'%s\',\'%s\',\'%s\',\'%s\')"), name, sex, age, EID, prof, workexp,areacode,industryid,salary,email,pwd,smtpserver,smptport,eusername,epassword,contentfilename,attachmentfilen); // AfxMessageBox(strSQL); ExcuteSQL(strSQL); }
void CDbWriteThread::WriteData( CDbEvent::WriteParameter ¶mter, bool bSQL ) { //qDebug( ) << Q_FUNC_INFO << paramter.strSql << endl; if ( !paramter.bDbHistory || paramter.bTimeCard ) { ExcuteSQL( interfaceNormal, bSQL, paramter ); } if ( paramter.bDbHistory ) { if ( NULL == pHistoryThread ) { pHistoryThread = new CDbHistoryThread( ); } paramter.bDbHistory = bSQL; if ( pHistoryThread->AddParameters( paramter ) ) { pHistoryThread->start( ); pHistoryThread= NULL; } } }
//插入一条新数据至行业表 void CRegisterDialog::InsertANewIndustry(CString indName) { CString strSQL; strSQL.Format(_T("insert into Industry values ('%s')"), indName); ExcuteSQL(strSQL); }