DBselectObjectsByKeylist

Top  Previous  Next

Objects after object keys select.

With this procedure objects are selected after object keys as a selection criterion. Besides, all segments which have put the Flag selectable are searched.

A total of four selection functions are available. With OR become the objects whose object keys in the key list lie to the existing selection amount added, with AND will leave only such objects in the selection amount which also fulfil the new criterion or lie in another segment. With NEED only the objects will leave in the selection amount which do not fulfil the new criterion. With NEW the old selection amount is emptied and the objects which fulfil the new criterion are added to the selection list. The criterion for fulfilling the new selection condition is present that the object owns an object key which appears in the given list of the keys. The list can be long arbitrarily and may contain double entries.

Parametre

root (PROOT) [IN]

The trading of the data bank, it all segments with the Flag selectable are considered.

fkt (SELECT_FUNKTION) [IN]

Four different constants are available:

SELECT_NOT An object is removed from the selection list if it owns a key from the key list.

SELECT_OR An object is taken up in the selection list if it owns a key from the key list.

SELECT_NEW The selection list is emptied and then the objects are taken up in the list which own a key from the key list.

SELECT_AND An object is removed from the selection list if it owns no key from the key list. However, there remains in the list if it is in a not selectable segment.

keys (KEY *) [IN]

Pointer on a list with all keys which should be looked. The list may contain double ones.

keycnt (int) [IN]

The length of the key list. The size which is given in keycnt may not be bigger, than the number of the keys in keys. The value from keycnt may not be negative.

Result

(T_ERROR) [OUT]

If the procedure was explained perfectly, is the result ERROR_OK, but one of the error messages from error.h.

Declaration

#include "database.h"

 

T_ERROR DLLENTRY DBselectObjectsByKeylist (

PROOT root,

SELECT_FUNKTION fkt,

KEY * keys,

int keycnt

);

Related functions

DBselectObjectsByArea

DBselectObjectsByKeygroup

DBselectObjectsByObjectlist