void check_duration( PDT_HANDLE *duration,
INTEGER *result,
char sqlstate[6])
{
void * tmpBuf = 0;
int bufSize = 0;
int length;
/* Get the value of the PERIOD(DATE) duration. */
bufSize = SIZEOF_DATE * 2;
tmpBuf = FNC_malloc(bufSize);
FNC_GetInternalValue(*duration, tmpBuf, bufSize, &length);
...
}