Package l2p.database

Examples of l2p.database.FiltredPreparedStatement.executeUpdate()


      {
        con = L2DatabaseFactory.getInstance().getConnection();
        statement = con.prepareStatement("UPDATE characters SET accesslevel=? WHERE obj_Id=?");
        statement.setInt(1, acc_level);
        statement.setInt(2, obj_id);
        statement.executeUpdate();
        DatabaseUtils.closeStatement(statement);
        if(acc_level < 0)
        {
          int endban;
          if(period == -1)
View Full Code Here


      {
        con = L2DatabaseFactory.getInstance().getConnection();
        statement = con.prepareStatement("UPDATE characters SET nochannel = ? WHERE obj_Id=?");
        statement.setLong(1, NoChannel > 0 ? NoChannel / 1000 : NoChannel);
        statement.setInt(2, obj_id);
        statement.executeUpdate();
      }
      catch(Exception e)
      {
        res = false;
        _log.warning("Could not activate nochannel:" + e);
View Full Code Here

      {
        con = L2DatabaseFactory.getInstance().getConnection();
        statement = con.prepareStatement("UPDATE characters SET nochannel = ? WHERE obj_Id=?");
        statement.setLong(1, 0);
        statement.setInt(2, obj_id);
        statement.executeUpdate();
      }
      catch(Exception e)
      {
        res = false;
        _log.warning("Could not activate nochannel:" + e);
View Full Code Here

        {
          statement.setString(26, "");
          statement.setString(27, "");
        }
        statement.setInt(28, Item != null ? Item.getObjectId() : 0); //item_id
        statement.executeUpdate();
      }
      catch(Exception e)
      {
        _log.log(Level.SEVERE, "Could not insert log into DB:", e);
      }
View Full Code Here

        statement.setInt(6, fromChar.getY()); //location_y,
        statement.setInt(7, fromChar.getZ()); //location_z,
        statement.setString(8, Petition_text);
        statement.setString(9, fromChar.getName()); //STR_actor,
        statement.setString(10, fromChar.getAccountName()); //STR_actor_account,
        statement.executeUpdate();
      }
      catch(Exception e)
      {
        _log.log(Level.SEVERE, "Could not insert petition into DB:", e);
      }
View Full Code Here

      statement.setString(3, etc_str1); //etc_str1,
      statement.setString(4, etc_str2); //etc_str2
      statement.setString(5, etc_str3); //etc_str3,
      statement.setInt(6, etc_num1); //etc_num1,
      statement.setInt(7, etc_num2); //etc_num2,
      statement.executeUpdate();
    }
    catch(Exception e)
    {
      _log.log(Level.SEVERE, "Could not insert log into DB:", e);
    }
View Full Code Here

      offline = con.prepareStatement("INSERT INTO bonus(obj_id, bonus_name, bonus_value, bonus_expire_time) VALUES (?,?,?,?)");
      offline.setInt(1, player.getObjectId());
      offline.setString(2, bonus_class);
      offline.setInt(3, Config.SERVICES_RATE_SPECIAL_RATE);
      offline.setLong(4, bonus_expire.getTimeInMillis() / 1000);
      offline.executeUpdate();
    }
    catch(Exception e)
    {
      e.printStackTrace();
      show(new CustomMessage("common.Error", player), player);
View Full Code Here

    {
      con = L2DatabaseFactory.getInstance().getConnection();
      offline = con.prepareStatement("UPDATE characters SET sex = ? WHERE obj_Id = ?");
      offline.setInt(1, player.getSex() == 1 ? 0 : 1);
      offline.setInt(2, player.getObjectId());
      offline.executeUpdate();
    }
    catch(Exception e)
    {
      e.printStackTrace();
      show(new CustomMessage("common.Error", player), player);
View Full Code Here

      statement.setLong(5, _exp);
      statement.setLong(6, _sp);
      statement.setInt(7, _curFed);
      statement.setInt(8, _objectId);
      statement.setInt(9, _controlItemObjId);
      statement.executeUpdate();
      _respawned = true;
    }
    catch(Exception e)
    {
      _log.warning("could not store pet data: " + e);
View Full Code Here

                        if (logins.size() > 0) {
                            con = L2DatabaseFactory.getInstance().getConnection();
                            st = con.prepareStatement("DELETE FROM character_variables WHERE `name` = 'offline' AND `obj_id` IN (SELECT `obj_id` FROM `characters` WHERE `account_name`=?)");
                            for (Object login : logins) {
                                st.setString(1, (String) login);
                                st.executeUpdate();
                            }
                        }
                    } catch (Exception e) {
                        e.printStackTrace();
                    } finally {
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.