Hi all,

I have a database which I need to update. I want to search for the record
which needs updating. However, the record is never found, so I have multiple
records with the same key data. Here is how I am doing it :
-------------------------------------------------------------------------------------
// indicate that we want the record which holds the lData value in the first
field
CeProps[0].propid = MAKELONG(CEVT_UI4, 1);
CeProps[0].val.ulVal = lData;

// search for the ceoid indicated
CeOid = CeSeekDatabaseEx(hDb, CEDB_SEEK_VALUEFIRSTEQUAL, (unsigned
long)CeProps, 1, NULL);
-----------------------------------------------------------------------------------------

If I try to open the database with the same sort spec with which it was
created, the open fails. Here is what I am doing :

----------------------------------------------------------------------------------
SortSpec.wVersion = SORTORDERSPECEX_VERSION;
SortSpec.wNumProps = 1;
SortSpec.wKeyFlags = CEDB_SORT_UNIQUE;
SortSpec.rgPropID[0] = MAKELONG(CEVT_UI4, 1);
SortSpec.rgdwFlags[0] = CEDB_SORT_NONNULL;

// open the datase
hDb = CeOpenDatabaseEx2(&SysGuid, &DbOid, POOMWATCH_DBNAME, &SortSpec,
CEDB_AUTOINCREMENT, NULL);
---------------------------------------------------------------------------------

Can anyone help me with this, please?
Best regards
Simon