bool CRBase::GetLenStatus(ULONG nCol, DBTYPE nDBType, ULONG *pnLen, ULONG *pnDBStatus, BYTE nPrecision=0, BYTE nScale=0);

Return Value

        true if successful; otherwise false.

Parameters

        [in] nCol:

                A column ordinal.

        [in] nDBType:

                A data type indicator.

        [in] pnLen:

                A pointer to a ULONG data which will receive the length in bytes.

        [in] pnDBStatus:

                A pointer to a ULONG data which will receive the database status.

        [in] nPrecision:

                The maximum precision to use when nDBType is DBTYPE_NUMERIC or DBTYPE_VARNUMERIC only.

        [in] nScale:

                The scale to use when nDBType is DBTYPE_NUMERIC, DBTYPE_VARNUMERIC, or DBTYPE_DECIMAL only.

Remark

        Gets a data length and status by creating a temporary accessor no matter if the column is discarded. This function is designed for a given data type with better flexibility. In comparison with CRBase::GetLength/CRBase::GetLengthPtr and CRBase::GetStatus/CRBase::GetStatusPtr, this function is somewhat less efficient because it creates a temporary accessor and releases the accessor after call but it is more flexible.

CRBase Class Overview & Class Members