Beispiel #1
0
void EnvImpl::allocDescriptorArray(DescriptorType descriptorType,
                                   unsigned int arraySize,
                                   Descriptor **descriptorArray)
{
  ociCallEnv(OCIArrayDescriptorAlloc(envh_, (void **)descriptorArray,
                                     descriptorType, arraySize,
                                     0, NULL), envh_);
}
Beispiel #2
0
sword OCI_DescriptorArrayAlloc
(
    CONST dvoid *parenth,
    dvoid      **descpp,
    CONST ub4    type,
    ub4          nb_elem,
    CONST size_t xtramem_sz,
    dvoid      **usrmempp
)
{
    sword ret = OCI_SUCCESS;

#if OCI_VERSION_COMPILE >= OCI_11_1

    if (OCILib.version_runtime >= OCI_11_1)
    {
        ret = OCIArrayDescriptorAlloc(parenth, descpp, type, nb_elem, xtramem_sz, usrmempp);

    }
    else

#endif

    {
        ub4 i;

        for (i = 0; (i < nb_elem) && (OCI_SUCCESS == ret); i++)
        {
            ret = OCIDescriptorAlloc(parenth, &descpp[i], type, xtramem_sz, usrmempp);
        }
    }

    if (OCI_SUCCESSFUL(ret))
    {
        OCI_MUTEXED_CALL(OCILib.nb_descp += nb_elem)
    }

    return ret;
}