IContentListSchema::get_ColumnType, put_ColumnType Property
For the latest version of Commerce Server 2007 Help, see the Microsoft Web site.
The ColumnType property is a read/write value from the ColumnTypeEnum enumeration, specifying the data type of the specified column.
HRESULT IContentListSchema::get_ColumnType(
VARIANT vColumn,
ColumnTypeEnum* ColumnType
);
HRESULT IContentListSchema::put_ColumnType(
VARIANT vColumn,
ColumnTypeEnum ColumnType
);
Property ColumnType(
vColumn As Variant
) As ColumnTypeEnum
Parameters
vColumn
[C++][in] A VARIANT that contains either the column name or the column position in order to identify the column in question. Column positions are counted from zero (0), not one (1).
[Visual Basic]
A Variant that contains either the column name or the column position in order to identify the column in question. Column positions are counted from zero (0), not one (1).
ColumnType
[C++][in] When putting the property, a value from the ColumnTypeEnum enumeration. See the Remarks section for more details.
[out,retval] When getting the property, a pointer used to return a value from the ColumnTypeEnum enumeration. See the Remarks section for more details.
Return Value
[C++]
These methods return an HRESULT indicating whether they completed successfully. See the Error Values section for more details.
[Visual Basic]
None.
Error Values
[C++]
These methods return S_OK (0x00000000) to indicate success and standard COM HRESULT error values to indicate failure. For more information about standard COM errors, see Standard COM Errors. Additional information may be available using the global Err object, which can be accessed using the API function GetErrorInfo. In particular, the GetDescription method of the IErrorInfo interface may return a text description of the error.
[Visual Basic]
This property sets the Number property of the global Err object to S_OK (&H00000000) to indicate success and to standard COM error values to indicate failure. For more information about standard COM errors, see Standard COM Errors. Additional information may be available using the global Err object. In particular, the Description property may contain a text description of the error.
Remarks
The following table shows the values of the ColumnTypeEnum enumeration, their associated names, and describes their use.
Name |
Value |
Description |
---|---|---|
CLCOL_I2 |
2 |
A 16-bit integer. This value corresponds to the VARTYPE value VT_I2. |
CLCOL_I4 |
3 |
A 32-bit integer. This value corresponds to the VARTYPE value VT_I4. |
CLCOL_R4 |
4 |
A single precision floating point number. This value corresponds to the VARTYPE value VT_R4. |
CLCOL_R8 |
5 |
A double precision floating point number. This value corresponds to the VARTYPE value VT_R8. |
CLCOL_CY |
6 |
A 64-bit integer used to store a currency value. This value corresponds to the VARTYPE value VT_CY. Monetary values stored using this type are scaled by 10,000 (4 decimal places). For example, the value 86900 would correspond to a currency value of $8.69 in the US. This is also the same as the money datatype used by SQL Server. |
CLCOL_DATE |
7 |
A double precision floating point number used to store a date/time value. This value corresponds to the VARTYPE value VT_DATE. |
CLCOL_DISPATCH |
9 |
A reference to an object that supports scripting/automation (inherits from IDispatch). This value corresponds to the VARTYPE value VT_DISPATCH. |
CLCOL_BOOL |
11 |
A boolean. This value corresponds to the VARTYPE value VT_BOOL. Do not confuse this with the C++ type BOOL, which is 4 bytes. |
CLCOL_UNKNOWN |
13 |
A pointer to an IUnknown-based interface that, presumably, does not support scripting/automation (inherits from IUnknown). This value corresponds to the VARTYPE value VT_UNKNOWN. |
CLCOL_STRING |
14 |
A pointer to a string in the private heap maintained by every ContentListFactory object. There is no corresponding VARTYPE value. |
CLCOL_VARIANTARRAY |
15 |
A pointer to a SAFEARRAY. The corresponding variant type is VT_ARRAY or VT_VARIANT. |
With the exception of CLCOL_STRING and CLCOL_VARIANTARRAY, these types are identical to the corresponding VARTYPE and share the same constant value. Indeed, they may be used as a VARTYPE.