GenID.InitializeCounter

Ee799402.c++_on(en-US,CS.10).gifEe799402.vb_off(en-US,CS.10).gif

Use this method to create or reset a global, sequential counter.

Definition

Sub InitializeCounter(bstrCounterName As String,dwInitialValue As Long)

Parameters

bstrCounterName

A String that contains the counter name.

dwInitialValue

A Long that contains the initial value of the counter.

Return Values

None.

Error Values

This method sets the Number property of the global Err object to S_OK (&H00000000) to indicate success and to standard COM error values to indicate failure. For more information about standard COM errors, see Standard COM Errors. Additional information may be available using the global Err object. In particular, the Description property may contain a text description of the error.

Remarks

Any number of counters may be created. If the counter already exists, its value is reset to the specified initial value.

A global counter will work across multiple computers.

The Initialize method must be called before calling the InitializeCounter method.

Example

' oGenID``is a Commerce GenID object

oGenID.InitializeCounter("OrderCounter", 213)

See Also

GenID Object


All rights reserved.