Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This function deletes a record from a database.

Syntax

BOOL CeDeleteRecord(
  HANDLE 
hDatabase,
  CEOID 
oidRecord
);

Parameters

hDatabase

[in] Handle to the database from which to delete the record. The database is opened by using the CeOpenDatabaseInSession (EDB)function.

oidRecord

[in] Object identifier of the record to delete. This object identifier must have been generated from EDB, not CEDB.

Return Value

TRUE indicates success. FALSE indicates failure. To get extended error information, call GetLastError. The following table lists possible values.

Return Value Description

ERROR_INVALID_HANDLE

The hDatabaseparameter is set to NULL or equal to INVALID_HANDLE_VALUE.

ERROR_INVALID_PARAMETER

The oidRecordparameter is set to NULL or invalid.

ERROR_NOT_FOUND

The record specified by oidRecorddoes not exist.

ERROR_SHARING_VIOLATION

Indicates a lock conflict.

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 fails. If the CEDB_AUTOINCREMENT flag was specified, the system automatically moves the current seek pointer forward by one.

Requirements

Header windbase.h
Library coredll.lib
Windows Embedded CE Windows CE 5.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also