src/com/shrewdify/diaroser/utils/DbHelper.java
public  boolean updateUserBalance(String username,
			int reservedbalance, int balance) throws SQLException{
		boolean data = Constants.FL_VAL;
		if (connection != null) {
			// float reservedUnits = 0.0f;
			psUpdUserFinaBal.setInt(1, reservedbalance);
			psUpdUserFinaBal.setInt(2, balance);
			psUpdUserFinaBal.setString(3, username);
			int rowsUpdates = psUpdUserFinaBal.executeUpdate();
			if (rowsUpdates == 1)
				data = Constants.TR_VAL;
		}

		return data;

	}
/**
	 * 
	 * @param username //account name of the user.
	 * @param reservedbalance // Total balance Reserved for user.
	 * @param balance //Total amount used from the balance.
	 * @return
	 * @throws SQLException
	 * 
	 * Update user account with final balance after the complete transaction.
	 */
@param username //account name of the user.
@param reservedbalance // Total balance Reserved for user.
@param balance //Total amount used from the balance.

Update user account with final balance after the complete transaction.
@param username // account name of the user . @param reservedbalance // Total balance Reserved for user . @param balance // Total amount used from the balance . Update user account with final balance after the complete transaction .
public  boolean updateUserBalance(String username,
			int reservedbalance, int balance) throws SQLException{
		boolean data = Constants.FL_VAL;
		if (connection != null) {
			psUpdUserFinaBal.setInt(1, reservedbalance);
			psUpdUserFinaBal.setInt(2, balance);
			psUpdUserFinaBal.setString(3, username);
			int rowsUpdates = psUpdUserFinaBal.executeUpdate();
			if (rowsUpdates == 1)
				data = Constants.TR_VAL;
		}
		return data;
	}
public boolean updateUserBalance ( String username , int reservedbalance , int balance ) throws SQLException { boolean data = Constants . FL_VAL ; if ( connection != null ) { psUpdUserFinaBal . setInt ( 1 , reservedbalance ) ; psUpdUserFinaBal . setInt ( 2 , balance ) ; psUpdUserFinaBal . setString ( 3 , username ) ; int rowsUpdates = psUpdUserFinaBal . executeUpdate ( ) ; if ( rowsUpdates == 1 ) data = Constants . TR_VAL ; } return data ; }
@param username //account name of the user.
@param username // account name of the user .
// float reservedUnits = 0.0f;