Package l2p.database

Examples of l2p.database.FiltredPreparedStatement.executeUpdate()


      statement = con.prepareStatement(stmt);
      statement.setInt(1, banLevel);
      statement.setString(2, comments);
      statement.setInt(3, banTime);
      statement.setString(4, user);
      statement.executeUpdate();
    }
    catch(Exception e)
    {
      _log.warning("Could not set accessLevel: " + e);
    }
View Full Code Here


      con = L2DatabaseFactory.getInstance().getConnection();
      statement = con.prepareStatement("UPDATE accounts SET AllowIPs = ?, lock_expire = ? WHERE login = ?");
      statement.setString(1, IP);
      statement.setInt(2, time);
      statement.setString(3, accname);
      statement.executeUpdate();
      DatabaseUtils.closeStatement(statement);
    }
    catch(Exception e)
    {
      _log.severe("Failed to lock/unlock account: " + e.getMessage());
View Full Code Here

        else
        {
          statement = con.prepareStatement("UPDATE accounts SET password = ? WHERE login = ?");
          statement.setString(1, LoginController.DEFAULT_CRYPT.encrypt(newPass));
          statement.setString(2, accname);
          int result = statement.executeUpdate();
          L2LoginClient client = LoginController.getInstance().getAuthedClient(accname);
          if(result != 0)
          {
            Log.add("<acc=\"" + accname + "\" old=\"" + oldPass + "\" new=\"" + newPass + "\" ip=\"" + (client != null ? client.getIpAddress() : "0.0.0.0") + "\" />", "passwords");
          }
View Full Code Here

        else
        {
          statement = con.prepareStatement("UPDATE accounts SET login = ? WHERE login = ?");
          statement.setString(1, newacc);
          statement.setString(2, oldacc);
          int result = statement.executeUpdate();
          L2LoginClient client = LoginController.getInstance().getAuthedClient(oldacc);
          if(result != 0)
          {
            Log.add("<old=\"" + oldacc + "\" new=\"" + newacc + "\" ip=\"" + (client != null ? client.getIpAddress() : "0.0.0.0") + "\" />", "accounts");
          }
View Full Code Here

    {
      con = L2DatabaseFactory.getInstance().getConnection();
      offline = con.prepareStatement("DELETE FROM character_quests WHERE name=? AND char_id IN (SELECT obj_id FROM characters WHERE clanId=? AND online=0)");
      offline.setString(1, getName());
      offline.setInt(2, clan);
      offline.executeUpdate();
    }
    catch(Exception e)
    {
      e.printStackTrace();
    }
View Full Code Here

        offline = con.prepareStatement("UPDATE character_quests SET value=? WHERE char_id=? AND var=? AND name=?");
        offline.setString(1, value);
        offline.setInt(2, leaderId);
        offline.setString(3, var);
        offline.setString(4, getName());
        offline.executeUpdate();
      }
      catch(Exception e)
      {
        e.printStackTrace();
      }
View Full Code Here

    {
      con = L2DatabaseFactory.getInstance().getConnection();
      offline = con.prepareStatement("DELETE FROM character_quests WHERE name = ? AND char_id IN (SELECT obj_id FROM characters WHERE clanId = ? AND online = 0)");
      offline.setString(1, getName());
      offline.setInt(2, clan);
      offline.executeUpdate();
    }
    catch(Exception e)
    {
      e.printStackTrace();
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.