inline ULONG* CRBase::GetLengthPtr(ULONG nCol);

Return Value

        A pointer to a ULONG data indicating a data length in bytes.

Parameter

        [in] nCol:

                The column ordinal.

Remark

        Gets a pointer to a ULONG data indicating the data length of the column nCol in bytes, There are three possible cases as listed in the following:

  1. If the column nCol is discarded by calling CRBase::SetDBPart, the returned pointer will be NULL.
  2. If the data type of the column nCol is a variable-length data, the returned pointer will point to a valid address with the length set from a provider when the column nCol dbPart is set with DBPART_LENGTH but it will be NULL if the column nCol DBPART is not set with DBPART_LENGTH.
  3. If the data type of the column nCol is fixed-length data, the returned pointer will point to a valid address with the fixed-length data length as long as the column is not discarded.

        As long as neither CRBase::SetDataType nor CRBase::SetDBPart is called, the returned pointer itself will not be changed but the pointed value may be changed if the column data type is a variable-length type.

CRBase Class Overview & Class Members