CeSetDatabaseInfo

The CeSetDatabaseInfo function sets various database parameters, including the name, type, and sort-order descriptions. A RAPI version of this function exists and is also called CeSetDatabaseInfo.

Syntax

BOOL CeSetDatabaseInfo(CEOID oidDbase, CEDBASEINFO * pNewInfo);

At a Glance

Header file: Winbase.h
Component: fsdbase
Platforms: H/PC
Windows CE versions: 1.01 and later

Parameters

oidDbase
Object identifier of the database for which parameters are to be set.
pNewInfo
Pointer to a CEDBASEINFO structure that contains new parameter information for the database. The wNumRecords member of the structure is not used.

Return Values

If the function succeeds, the return value is TRUE. If the function fails, the return value is FALSE. To get extended error information when within a CE program call GetLastError. If within a RAPI program, call CeGetLastError. GetLastError and CeGetLastError may return one of the following values:

ERROR_INVALID_PARAMETER
A parameter was invalid.
ERROR_DISK_FULL
The object store is full and any size changes required could not be accomodated. Changing sort orders can change the size of the stored records, though not by much.
ERROR_SHARING_VIOLATION
CeSetDatabaseInfo tried to remove a sort order that is being used by a currently open database.

Remarks

The CeSetDatabaseInfo function can be used to change the database parameters passed in while creating the database. Note that changing the sort order of the database can take several minutes. Before calling CeSetDatabaseInfo, an application should warn the user that this operation can be lengthy.

For more information, see Accessing Persistent Storage.

When writing applications for Windows CE version 1.0, use the PegSetDatabaseInfo function.

See Also

CeCreateDatabase, CEDBASEINFO, CeOidGetInfo