次の方法で共有


CeDeleteRecord (CEDB) (Windows Embedded CE 6.0)

1/6/2010

This function deletes a record from a database.

This function does not work with EDB databases. For more information, see EDB Functions.

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

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
Windows Embedded CE Windows CE 1.01 and later

See Also

Reference

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