If Contact does not exists in the database, OutlookConnect executes the SQL statement (entered in Assign Table->Primay/Mandatory keys dialog) to generate new primary key.
For Example:
select max(OCS_ID) + 1 from CONTACTS
This will result in increasing numbers like:1,2,3 etc.
The result value will be inserted into the database, together with other linked fields.
The generated key will be also stored in special User Defined fields in Contact Item:OCMPRIMNAMES,OCMPRIMVALUES.
If the contact item has already this special fields, OutlookConnect will try to update existing record,
if the record does not exist, OutlookConnect will insert new record with the value from OCMPRIMVALUES, so if you copie contact items from different Contact folder that was also
using OutlookConnect, or if you manualy change the OCMPRIMVALUES, then it is possible to get gaps/wrong records in the database.