COleCurrency::GetStatus
CurrencyStatus GetStatus( ) const;
Return Value
Returns the status of this COleCurrency value.
Remarks
Call this member function to get the status (validity) of a given COleCurrency object.
The return value is defined by the CurrencyStatus enumerated type which is defined within the COleCurrency class.
enum CurrencyStatus{
valid = 0,
invalid = 1,
null = 2,
};
For a brief description of these status values, see the following list:
-
COleCurrency::valid Indicates that this COleCurrency object is valid.
-
COleCurrency::invalid Indicates that this COleCurrency object is invalid; that is, its value may be incorrect.
-
COleCurrency::null Indicates that this COleCurrency object is null, that is, that no value has been supplied for this object. (This is “null” in the database sense of “having no value,” as opposed to the C++ NULL.)
The status of a COleCurrency object is invalid in the following cases:
-
If its value is set from a VARIANT or COleVariant value that could not be converted to a currency value.
-
If this object has experienced an overflow or underflow during an arithmetic assignment operation, for example += or *=.
-
If an invalid value was assigned to this object.
-
If the status of this object was explicitly set to invalid using SetStatus.
For more information on operations that may set the status to invalid, see the following member functions:
COleCurrency Overview | Class Members | Hierarchy Chart
See Also COleCurrency::SetStatus, COleCurrency::m_status