public int setCount ( double dFieldCount , boolean bDisableListeners , int iMoveMode ) { int iErrorCode = DBConstants . NORMAL_RETURN ; if ( m_fldMain != null ) { boolean [ ] rgbEnabled = null ; if ( bDisableListeners ) rgbEnabled = m_fldMain . setEnableListeners ( false ) ; int iOriginalValue = ( int ) m_fldMain . getValue ( ) ; boolean bOriginalModified = m_fldMain . isModified ( ) ; int iOldOpenMode = m_fldMain . getRecord ( ) . setOpenMode ( m_fldMain . getRecord ( ) . getOpenMode ( ) & ~ DBConstants . OPEN_REFRESH_AND_LOCK_ON_CHANGE_STRATEGY ) ; // don't trigger refresh and write iErrorCode = m_fldMain . setValue ( dFieldCount , true , iMoveMode ) ; // Set in main file's field if the record is not current m_fldMain . getRecord ( ) . setOpenMode ( iOldOpenMode ) ; if ( iOriginalValue == ( int ) m_fldMain . getValue ( ) ) if ( bOriginalModified == false ) m_fldMain . setModified ( bOriginalModified ) ; // Make sure this didn't change if change was just null to 0. if ( rgbEnabled != null ) m_fldMain . setEnableListeners ( rgbEnabled ) ; } return iErrorCode ; }
Reset the field count .