/** @class DeleteFromTables @author Brian Magill @datecreated 3/06/2007 $Date:$ $Revision:$ @copyright (©) Copyright 2006 by GATS Inc. 11864 Canon Blvd., Suite 101, Newport News, VA 23606 All Rights Reserved. No part of this software or publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise without the prior written permission of GATS Inc. @brief Class returns a vector of data associated with a given table parameter */ //---------------------------------------------------------------------- // #include #include #include #include "DeleteFromTables.h" #include "GATS_DB_Exception.h" #include "GATS_Utilities.hpp" //#include "Vec2Val.hpp" //#include "SOFIELevel1DBUtilities.h" using namespace std; using namespace gatsDBpp; using namespace GATS_Utilities; void DeleteFromTables::operator()(vector const & tableList, int event) const { string strErr; unsigned long indx; try { GATS_DB_Results results; for(indx = 0; indx < tableList.size(); indx++) { string strSQL = "DELETE FROM " + tableList[indx] + " WHERE Event = " + ConvertToString(event); results = dbConn->Query(strSQL.c_str()); } } catch (exception &ex) { strErr = "DeleteFromTables Warning: " + string(ex.what()) + string(" for table ") + tableList[indx]; } };