Previous topic Next topic  

CacheInsertLockMode ( nMode, hConnection ) -> nPrevLockMode

The function set the locking mode to honour when appending/inserting a record for the database represented by [hConnection] and returns the previously set mode.

<nMode> CachéRDD supports three append locking modes, viz,;


INSERT_LOCK_MODE_CLIPPER - Unlock previously locked record and tries to lock the currently appended record.


INSERT_LOCK_MODE_ADVANTAGE - Retains the previously locked records and also locks the current appended record.


INSERT_LOCK_MODE_NOLOCK - Does not locks the current record and also does not unlock the previous records.

The default is INSERT_LOCK_MODE_CLIPPER. INSERT_LOCK_MODE_NOLOCK is important when you are to append a large number of records and you know there is no concurrency, i.e., during upload of existing tables to the server. This increases the performance of uploads manyfold.

Note that the function issued is per <hConnection>. So after this is called all database operations in all work areas respect these settings. Suggested practice is: call this function before APPEND FROM ... is executed and reset after APPEND FROM terminates so that other work areas are not affected.