Share via


PosCommon.UpdateStatistic Method

Namespace: Microsoft.PointOfService
Assembly: Microsoft.PointOfService (in microsoft.pointofservice.dll)

Usage

'Usage
Dim name As String
Dim value As Object
Dim posCommon1 As PosCommon
posCommon1.UpdateStatistic(name, value)

Syntax

'Declaration
Public MustOverride Sub UpdateStatistic( _
    ByVal name As String, _
    ByVal value As Object _
)
public abstract void UpdateStatistic(
    string name,
    object value
);
public: abstract Void UpdateStatistic(
    String^ name,
    Object^ value
);
public abstract void UpdateStatistic(
    System.String name,
    System.Object value
);
public abstract function UpdateStatistic(
     name : String,
     value : Object
) : Void;

Parameters

  • name
    Name of the statistic to be updated.
  • value
    Value to which the statistic should be set.

Remarks

The application calls UpdateStatistic to update the value of a specified device statistic.

For UpdateStatistic to be successful, both the CapStatisticsReporting and CapUpdateStatistics properties must be set to TRUE.

UpdateStatistic is always executed synchronously.

UpdateStatistic returns void if successful, and it can throw the following exceptions:

Value

Meaning

Illegal

One of the following conditions has occurred:

  • The CapStatisticsReporting or CapUpdateStatistics property is set to FALSE;

  • The statistic parameter is null; or

  • The specified statistic doesn’t exist; or

  • The specified statistic is not updatable.

Extended

ExtendedErrorStatistics. An error occurred while attempting to update the specified statistic.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Development Platforms

Windows XP Home Edition, Windows XP Professional, Windows Server 2003, Windows Longhorn, and Windows 2000

Target Platforms

See Also

Reference

PosCommon Class
PosCommon Members
Microsoft.PointOfService Namespace
CapStatisticsReporting
CapUpdateStatistics