inline ULONG CRBase::GetLength(ULONG nCol);

Return Value

        The length of a column data in bytes.

Parameter

        [in] nCol:

                The column ordinal.

Remark

        Gets the length of a column data in bytes by calling CRBase::GetLengthPtr. There are three possible cases as listed in the following:

  1. If the column nCol is discarded by calling CRBase::SetDBPart, the length is zero.
  2. If the data type of the column nCol is variable-length data, the returned length will be the data set from a provider if the column nCol dbPart is set with DBPART_LENGTH, and it will be zero 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 length will be always determined by CPureBase::GetFixLen as long as the column is not discarded.

        A user can also call CRBase::GetLenStatus by creating a temporary accessor to get the length for the column nCol.

CRBase Class Overview & Class Members