CCeDBProp::CCeDBProp

This constructor constructs a CCeDBProp object.

At a Glance

Header file: Wcedb.h
Platforms: H/PC 2.0, Palm-size PC, H/PC Pro
Windows CE versions: 2.0 and later

Syntax

CCeDBProp( );

CCeDBProp( CCeDBProp::enType nType, WORD wIdent = 0,
WORD
wSortFlags = Sort_Ascending );

CCeDBProp( short iVal, WORD wIdent = 0 );

CCeDBProp( USHORT uiVal, WORD wIdent = 0 );

CCeDBProp( long lVal, WORD wIdent = 0 );

CCeDBProp( ULONG ulVal, WORD wIdent = 0 );

CCeDBProp( FILETIME filetime, WORD wIdent = 0 );

CCeDBProp( LPWSTR lpwstr, WORD wIdent = 0, CCeDBProp::enCopyMode nMode = Copy );

CCeDBProp( CEBLOB blob, WORD wIdent = 0,
CCeDBProp::enCopyMode
nMode = Copy );

CCeDBProp( CCeDBProp& prop );

Parameters

nType
Data type of the property, used only when constructing valueless properties. CCeDBProp::enType is an enumeration that defines the following values:
CCeDBProp::Type_Short
A signed short integer.
CCeDBProp::Type_UShort
An unsigned short integer.
CCeDBProp::Type_Long
A signed long integer.
CCeDBProp::Type_ULong
An unsigned long integer.
CCeDBProp::Type_Filetime
A FILETIME structure.
CCeDBProp::Type_String
A null-terminated string. This is a wide character array (WCHAR), not a CString object.
CCeDBProp::Type_Blob
A CEBLOB structure.
wIdent
Application-defined identifier of the property. The default value is zero.
wSortFlags
For a sort property, the flags that determine the sort order. It is one of the following values:
CCeDBProp::Sort_Ascending
The sort is done in ascending order.
CCeDBProp::Sort_CaseInsensitive
The sort operation is case insensitive. This value is valid only for strings.
CCeDBProp::Sort_Descending
The sort is done in descending order.
CCeDBProp::Sort_UnknownFirst
Records that do not contain the property identified by wIdent are placed before all the other records. By default, these records are placed after all other records.
iVal
Signed short integer value.
uiVal
Unsigned short integer value.
lVal
Signed long integer value.
ulVal
Unsigned long integer value.
filetime
FILETIME structure, initialized with meaningful data.
lpwstr
Long pointer to a string. This must be a wide character array (WCHAR), not a CString object.
blob
CEBLOB structure, initialized with meaningful data.
nMode
Specifies whether to allocate memory to store the passed in string or BLOB. It is one of the following values:
CCeDBProp::Copy
Allocates new memory. The property will have its own copy of the string or BLOB used to create it.
CCeDBProp::NoCopy
Maintains a pointer to the existing string or BLOB, but does not own it.
prop
CCeDBProp object to be copied.

Remarks

The default constructor sets the property's value to (long) 0. The default sort flag is CCeDBProp::Sort_Ascending.

The overloaded constructor with the syntax CCeDBProp(CCeDBProp::enType nType, WORD wIdent , WORD wSortFlags) is used to create valueless properties. Use valueless properties to set a database’s sort orders, and to create filters for reading and writing records. When you create valueless properties for filters, ignore the wSortFlags parameter.

See Also

CEBLOB, FILETIME