/[PAMELA software]/chewbacca/PamOffLineSW/PacketUser.cpp
ViewVC logotype

Diff of /chewbacca/PamOffLineSW/PacketUser.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4 by mocchiut, Thu Dec 18 14:46:56 2008 UTC revision 1.5 by mocchiut, Mon Dec 22 16:50:10 2008 UTC
# Line 1  Line 1 
1  //============================================================================  //============================================================================
2  // $Id: PacketUser.cpp,v 1.3 2008/12/18 12:58:37 mocchiut Exp $  // $Id: PacketUser.cpp,v 1.4 2008/12/18 14:46:56 mocchiut Exp $
3  // Description :  // Description :
4  //============================================================================  //============================================================================
5  #include "PacketUser.h"  #include "PacketUser.h"
# Line 614  bool PacketUser::saveROOT_DB(char* table Line 614  bool PacketUser::saveROOT_DB(char* table
614      << bad_pkt <<"','" << bad_pkt_read <<"','"<< bad_pkt_CalRead <<"','"<< num_PKT_Saved<<"','"      << bad_pkt <<"','" << bad_pkt_read <<"','"<< bad_pkt_CalRead <<"','"<< num_PKT_Saved<<"','"
615      << nome_input <<"',"      << nome_input <<"',"
616      <<"NULL,"<<_time_is_estimated<<        <<"NULL,"<<_time_is_estimated<<  
617      ")";                  ");";          
618          string msg = oss.str();          string msg = oss.str();
619          mainLogUtil->logAll(msg);                mainLogUtil->logAll(msg);      
620                    
# Line 664  void PacketUser::recover_boot_number(){ Line 664  void PacketUser::recover_boot_number(){
664      return;      return;
665        
666    for (int i = 0; i<id_to_recover_index;i++){    for (int i = 0; i<id_to_recover_index;i++){
667      oss << "UPDATE "<<  Table_ROOT_Good << " SET BOOT_NUMBER=" << boot_number << " WHERE ID_N=" << id_to_recover[i];        oss.str("");
668        oss << "UPDATE "<<  Table_ROOT_Good << " SET BOOT_NUMBER=" << boot_number << " WHERE ID_N=" << id_to_recover[i] << ";";  
669     query = oss.str();     query = oss.str();
670     res= sqlServer->Query(query.c_str());     res= sqlServer->Query(query.c_str());
671     if(!res)     if(!res)
# Line 676  void PacketUser::recover_boot_number(){ Line 677  void PacketUser::recover_boot_number(){
677     }     }
678    }    }
679    
680  for (int i = 0; i<id_to_recover_index;i++){    for (int i = 0; i<id_to_recover_index;i++){
681    oss << "UPDATE " <<  Table_ROOT_Merging << " SET BOOT_NUMBER=" <<  boot_number << " WHERE ROOT_ID_N=" << id_to_recover[i];        oss.str("");
682    query=oss.str();      oss << "UPDATE " <<  Table_ROOT_Merging << " SET BOOT_NUMBER=" <<  boot_number << " WHERE ROOT_ID_N=" << id_to_recover[i] << ";";  
683     res= sqlServer->Query(query.c_str());      query=oss.str();
684     if(!res)      res= sqlServer->Query(query.c_str());
685     {          if(!res)
686          {
687             oss1<<"DBError UNABLE to: "<<query.c_str()<<endl;               oss1<<"DBError UNABLE to: "<<query.c_str()<<endl;  
688             msg1=oss1.str();             msg1=oss1.str();
689             mainLogUtil->logError(msg1);               mainLogUtil->logError(msg1);  

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

  ViewVC Help
Powered by ViewVC 1.1.23