DBaddObject

Top  Previous  Next

Object add.

An object is inserted in the data bank. This object is empty at the beginning. As a result a trading is delivered for this object with whose help the object with information can be filled. The object is assigned to a segment of the data bank and is assigned to a plan in this segment. The plan can be let out under certain conditions. This is the case if in this segment only one plan exists or if the allocation of the object should occur to a plan later. Furthermore one or several object keys can be added to this object immediately with the production. The number of the keys is not limited. More than 65535 keys are not possible, because every key is 2-byte-upright. Double keys and also 0 are not admitted.

Parametre

flat (PPLANS) [IN]

The new object is assigned to this plan. The value may be a ZERO. In this case the allocation is carried out by the programme. If, on this occasion, only one plan exists in the segment, the object is assigned to this plan, but it is assigned temporarily to the plan 0. This must be changed before the securing, because plan 0 is not protected.

keys (KEY *) [IN]

This is the field with the numbers of the keys which are assigned to the new object. Every key must be greater than 0. Double keys are ignored.

keycnt (int) [IN]

keycnt gives the number of the entries in the field keys. Stands here 0, no keys are assigned to the object. Then also needs keys no valid pointer be.

Result

(POBJECT) [OUT]

As a result the function delivers a trading for the new object. This identifies the object in all following calls.

 

Declaration

#include "database.h"

 

POBJECT DLLENTRY DBaddObject (

PPLANS flat,

KEY *keys,

int keyCnt

);