CDaoRecordset: "Item not found in this collection"
Posted on 2001-08-07
(From Visual C++ I use DAO (data access object) to work with a Access database.)
I'm going mad! Why do I get this message?
1) I open the recordset with:
m_rsTitle.Open (dbOpenDynaset, "SELECT TitleID, Title FROM Title");
2) Everytime I want to read or write to the set I do:
m_rsTitle.SetFieldValue ("Title", szBuffer);
With each read or write I get "Item not found in this collection"
I've tried using SetFieldValue (1, szBuffer) but it gives the same error.
The weird thing is that just yesterday it worked for the first record that I add,
but then after that it only gave the error. And it is not just with either GetFieldValue() or
SetFieldValue(), but with both.