Share via


CeDeleteRecord (CEDB) (Compact 2013)

3/26/2014

This function deletes a record from a database.

Syntax

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 (CEDB) function.
  • oidRecord
    [in] Object identifier of the record to be deleted, which is obtained from the CeWriteRecordProps (CEDB) function.

Return Value

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

If this function is called by a replication synchronization client thread, the synchronization flags determine its behavior. If the client has set the REPL_SYNC_ALLOWOVERWRITE flag, the call proceeds 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

Header

windbase.h

Library

coredll.lib

See Also

Reference

CEDB Functions
CeOpenDatabase (CEDB)
CeOpenDatabaseEx (CEDB)
CeWriteRecordProps (CEDB)
ReplOpenSync
ReplChangeSyncSettings