def writeData(self,req,tblName):
    try:
      res = writeDataSrvResponse()
      db_username,db_password=self.getLogin()
      con = mdb.connect('localhost', db_username, db_password, 'RappStore');
      cur = con.cursor()
      returncols=self.constructCommaColumns(req.req_cols)
      if (len(returncols)>1):
        returncols="("+returncols+")"
      print returncols
      values=""
      for i in range(len(req.req_data)):
        if (i==0):
          values=values+"("+self.constructCommaColumns(req.req_data[i].s)+")"
        else:
          values=values+",("+self.constructCommaColumns(req.req_data[i].s)+")"

      query="Insert into "+tblName+" "+ returncols+" values "+values
      cur.execute("LOCK TABLES "+tblName+" WRITE")
      cur.execute(query)
      cur.execute("UNLOCK TABLES")
      res.success.data=True
      res.trace.append("Success")
    except mdb.Error, e:
      res.trace.append(("Database Error %d: %s" % (e.args[0],e.args[1])))
      res.success.data=False
      print "Error %d: %s" % (e.args[0],e.args[1])
    except IndexError:
      res.trace.append("Wrong Query Input Format, check for empty required columns list or wrong/incomplete Query data format")
      res.success.data=False
      print "Wrong Query Input Format, check for empty required columns list or wrong/incomplete Query data format"
    except __HOLE__:
      print "Error: can\'t find login file or read data"
      res.success.data=False
      res.trace.append("Error: can\'t find login file or read data")
    return res

  ## @brief Implements the general delete data from table function
  # @param req [rapp_platform_ros_communications::deleteDataSrvRequest::Request&] The ROS service request
  # @param tblName [string] the table name
  # @param res [rapp_platform_ros_communications::deleteDataSrvResponse::Response&] The ROS service response
dataset/ETHPy150Open rapp-project/rapp-platform/rapp_mysql_wrapper/src/mysql_wrapper.py/MySQLdbWrapper.writeData