日期:2014-05-18 浏览次数:20456 次
while(!m_pRecordset->EndOfFile) { _vData = m_pRecordset->GetCollect( cDataName ); if( _vData.vt != VT_NULL ) { cData = (char*)(_bstr_t)_vData; //转换数据 } m_pRecordset->MoveNext(); //移到下一条记录 }
char * updata_cmd1 = "drop database dbtest" ;//删除指定数据库 char * updata_cmd2 = "UPDATE stu_info2 SET ssex = '女' WHERE sage = '50'" ; try { //对数据库执行sql语句 m_pConnection->Execute( updata_cmd1 , NULL , 1 ) ; m_pConnection->Execute( updata_cmd2 , NULL , 1 ) ; } catch( _com_error e ) { //抛出异常 std::cerr <<"\nEditData Function Error: "<<(char*)e.Description(); return false ; }