Routines for gnxtnum.kb


CacheCounters

File Name

gnxtnum.kb

Syntax

CacheCounters: Integer

Parameters

None

Returns

Integer, 1 = Success or Values already cached,

otherwise the SQLError is returned

Side Effects

None

Description

This function caches the records in the COUNTERS table into memory for those records that are configured to be cached.

Dialog Forms Called

None


CounterGet

File Name

gnxtnum.kb

Syntax

CounterGet(VAL CounterName: STRING, REF Counter: CountersEventRecord): BOOLEAN

Parameters

CounterName - name of counter for table

Counter - counter record

Returns

TRUE for success, FALSE for failure

Side Effects

None

Description

Reads a counter record from the cache, not the database.

Dialog Forms Called

None


CounterPut

File Name

gnxtnum.kb

Syntax

CounterPut(VAL Counter: CountersEventRecord): BOOLEAN

Parameters

Counter - counter record

Returns

TRUE for success, FALSE for failure

Side Effects

None

Description

Updates a counter record in the cache and the database.

Dialog Forms Called

None


GetNextNumber

File Name

gnxtnum.kb

Syntax

GetNextNumber ( VAL counterName: STRING ): INTEGER

Parameters

CounterName - name of counter for table

Returns

Next number

Side Effects

None

Description

Updates the next number for the counterName to the current number + 1. Then retrieves the current number as the next number for counterName.

Dialog Forms Called

None


GetNextNumber2

File Name

gnxtnum.kb

Syntax

GetNextNumber2(VAL CounterName: STRING): INTEGER

Parameters

CounterName - name of counter for table

Returns

Success: Next counter values.

Failure: -RDBMS Error, or -2 counter not found in cache

Side Effects

None

Description

Improved get next number algorithm.

Dialog Forms Called

None