public void updateUser(User user){
		try {
			Class.forName("org.apache.derby.jdbc.EmbeddedDriver");
			String url = "jdbc:derby:" + DBName;
			Connection connection = DriverManager.getConnection(url);
			Statement statement = connection.createStatement();

			DateFormat dtfLastLogin = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
			String lastLoginDate = dtfLastLogin.format(user.getLastLogin());

			String sqlStatement = "UPDATE users SET "
									+ "jnick='" + user.getNick() + "',"
									+ "level=" + user.getLevel() + ","
									+ "currentexp=" + user.getCurrentExp() + ","
									+ "rcoins=" + user.getrCoins() + ","
									+ "vcoins=" + user.getvCoins() + ","
									+ "jlastloggin='" + lastLoginDate + "' "
									+ "WHERE uid=" + user.getID();
			statement.executeUpdate(sqlStatement);
			statement.close();
			connection.close();
		} catch (Exception e) {
			e.printStackTrace();
			new ServerResultFrame(e.getMessage());
		}
	}