Reserves and returns key values for objects that use automatically numbered keys (like Contact, Address, Order, etc.)

Namespace: Asi.iBO
Assembly: Asi.iBO (in Asi.iBO.dll) Version: 15.1.3.0

Syntax

C#
public static int GetCounter(
	IiMISUser user,
	string counterName,
	int howMany
)
Visual Basic
Public Shared Function GetCounter ( _
	user As IiMISUser, _
	counterName As String, _
	howMany As Integer _
) As Integer
Visual C++
public:
static int GetCounter(
	IiMISUser^ user, 
	String^ counterName, 
	int howMany
)

Parameters

user
Type: Asi.iBO..::..IiMISUser
The IiMISUser object providing the security credentials of the logged in user.
counterName
Type: System..::..String
The name of the counter from which the next key is desired. Usually the name of the database table.
howMany
Type: System..::..Int32
The number of sequential keys to reserve. Reserving and applying a block of number is more efficient that getting them one at a time.

Return Value

The first number in the block.

See Also