![]() | Programming Guide | ![]() |
Processes a handling method property
#include <tmusubs.h>int sm_tm_handling(int prop);
prop- One of the property constants.
- ·
TM_PROCEEDif the property value specifies something other than function invocation or doing nothing, or ifdm_tm_listing_sqlis being done.
sm_tm_handlinganalyzes and, in some cases, processes the handling specified (indirectly) by thepropparameter for the specified table view. If the parameter isDM_SEL_FUNC_NAME,DM_INS_FUNC_NAME,DM_UPD_FUNC_NAMEorDM_DEL_FUNC_NAME, the handling is that of the correspondingPR_xxx_HANDLINGproperty. IfpropisDM_CONTINUE_FUNC_NAME, the choice of behavior is based onDM_SELECT_HANDLING, but the function invoked, if any, is theCONTINUEfunction. IfpropisDM_SAVE_FUNC_NAME, the function (if any) specified by that property is invoked if any of the insert, update or delete handling properties specify function invocation. OtherwiseTM_OKis returned.If the property value specifies to do nothing, this routine simply returns
TM_OK.If the property value specifies to invoke a function, this routine calls it; the function has no parameters. If the function returns a non-zero integer, and the
TM_STATUSmember ofsm_tm_curinfois zero, this routine puts that value there; it similarly proposes a generalized error message, if none has been set up. The return value from this routine isTM_FAILURE(for an error on the function call or a non-zero return from the function), orTM_OKfor a successful call with a zero value returned by the function. Absence of the corresponding function name value is an error, except forCONTINUEandSAVEfunctions. However, inability to find a function whose name has been specified as a property value is always an error. For this and other serious processing errors in function invocation, this routine reports an error and displays an error message.Otherwise this routine returns
TM_PROCEED.Since the handling properties are stored internally as strings, the property API access functions are used to get the more convenient
PV_integers.If
dm_tm_listing_sqlis being done, this routine always returnsTM_PROCEED.
![]()
![]()
![]()
![]()