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:
- If the column nCol is discarded by calling CRBase::SetDBPart, the length is zero.
- 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.
- 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.