CeDeleteRecord() problem



I am having a problem with the CeDeleteRecord() on a CEDB database. My
database contains several hundred records and I can delete them 'till
the cows come home without any problems, except for one record. The seek
function finds the record based on an index and returns a valid OID but
on this one record the delete function fails. I have included the guts
of my delete function below so if anyone can tell me how to get rid of
the offending record please let me know. The strange thing is that the
seek says the record is valid and the CeOidGetInfoEx function says the
record handle is valid but the read and delete functions both fail.
<CODE>
oid = CeSeekDatabaseEx(m_dbHandle,
CEDB_SEEK_BEGINNING,
offset,
0,
NULL);
if (!oid)
{
error = GetLastError();
}
else
{
// test code
CEOIDINFO info;
memset(&info, 0, sizeof(CEOIDINFOEX));
CeOidGetInfoEx(&m_dbGUID, oid, &info);
// Results indicate a valid record
error = GetLastError();
// No error
// end test code
CeDeleteRecord(m_dbHandle, oid);
error = GetLastError();
// fails with error == 87 - ERROR_INVALID_PARAMETER
}
</CODE>

Thanks in advance.
.



Relevant Pages

  • CeDeleteRecord() problem
    ... I am having a problem with the CeDeleteRecordon a CEDB database. ... The seek function finds the record based on an index and returns a valid OID but on this one record the delete function fails. ... // end test code ...
    (microsoft.public.windowsce.app.development)
  • Re: CeDeleteRecord() problem
    ... I ended up deleting the entire database and starting over so until I have another problem I won't be able to test your suggestion. ... calling CeReadRecordPropsEx on the record and usng the returned oid to delete the record. ... on this one record the delete function fails. ... // end test code ...
    (microsoft.public.windowsce.platbuilder)
  • Re: CeDeleteRecord() problem
    ... Jeremy wrote: ... "Steve Kelley" wrote: ... calling CeReadRecordPropsEx on the record and usng the returned oid to delete the record. ... // end test code ...
    (microsoft.public.windowsce.platbuilder)