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.2.0

Syntax

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

Parameters

server
Type: Asi.iBO..::.DataServer
The existing DataServer instance used to communicate with the database.
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