CeDeleteRecord call fails, GetLastError returns 0. - Windows CE

This is a discussion on CeDeleteRecord call fails, GetLastError returns 0. - Windows CE ; I am trying to use the CeDeleteRecord function on CE4.2. Sometimes this function fails (repeatable depending on the database I'm using). The odd thing is that it fails (returns FALSE), but an immediate call to GetLastError also returns 0. Upon ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: CeDeleteRecord call fails, GetLastError returns 0.

  1. CeDeleteRecord call fails, GetLastError returns 0.

    I am trying to use the CeDeleteRecord function on CE4.2. Sometimes
    this function fails (repeatable depending on the database I'm using).
    The odd thing is that it fails (returns FALSE), but an immediate call
    to GetLastError also returns 0. Upon verifying the state of the record
    that should have been deleted, it is indeed still there. Even more
    strange: if I call CeDeleteRecord a SECOND time after it fails the
    first time, the call succeeds and the record is deleted! Can anyone
    explain this behavior? Note: I am implementing a routine that stores a
    CRC with each record I save. I am deliberately corrupting a record
    using a hex editor (simply changing a byte in the record). My routine
    reads records in, verifies the CRC, and if bad, deletes the record.
    This delete is the part that is failing.


  2. Re: CeDeleteRecord call fails, GetLastError returns 0.

    I can attach the database if anyone at Microsoft would like to try and
    delete a record from it.


+ Reply to Thread