Share via


CeDeleteRecord

This function deletes a record from a database.

A RAPI version of this function exists named CeDeleteRecord (RAPI).

BOOL CeDeleteRecord(
  HANDLE hDatabase, 
  CEOID oidRecord
); 

Parameters

  • hDatabase
    [in] Handle to the database from which the record is to be deleted. The database must be open. Open a database by calling the CeOpenDatabaseEx2 function.
  • oidRecord
    [in] Object identifier of the record to be deleted, which is obtained from CeWriteRecordProps.

Return Values

TRUE indicates success. FALSE indicates failure. To get extended error information, call GetLastError. GetLastError 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.

If this API is called by a repl synchronization client thread, the sync flags will determine its behavior. If the client has set the REPL_SYNC_ALLOWOVERWRITE flag, the call will proceed normally. If the REPL_SYNC_ALLOWOVERWRITE flag is not set, the call may fail with ERROR_ACCESS_DENIED, to block the synchronization client from overwriting changes it has not yet read. For more information, see ReplOpenSync and ReplChangeSyncSettings.

Requirements

OS Versions: Windows CE 1.01 and later.
Header: Windbase.h.
Link Library: Coredll.lib.

See Also

CeOpenDatabase | CeOpenDatabaseEx | CeWriteRecordProps | ReplOpenSync | ReplChangeSyncSettings

 Last updated on Friday, April 09, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.