CeDeleteRecord

The CeDeleteRecord function deletes a record from a database. A RAPI version of this function exists and is also called CeDeleteRecord.

Syntax

BOOL CeDeleteRecord(HANDLE hDatabase, CEOID oidRecord);

At a Glance

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

Parameters

hDatabase
Handle to the database from which the record is to be deleted. The database must be open. Open a database by calling the CeOpenDatabase function.
oidRecord
Object identifier of the record to be deleted; this is obtained from CeOpenDatabase.

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 ERROR_INVALID_PARAMETER if the handle or object identifier is invalid.

Remarks

If the CEDB_AUTOINCREMENT flag was not specified when the database was opened, and the record being deleted is the current record, the next read operation that uses the database handle will fail. If the CEDB_AUTOINCREMENT flag was specified, the system automatically moves the current seek pointer forward by one.

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

See Also

CeOpenDatabase