Trying to update record with ATL consumer template
Posted on 2000-02-26
I am trying to update a record in an Access database via the standard ATL consumer template classes (namely CTable).
I can read from the database fine, but when I try to update the record, it fails. Here is some code:
CTable<CAccessor<CUserAccessor> > user;
ps.AddProperty(DBPROP_UPDATABILITY, DBPROPVAL_UP_CHANGE | DBPROPVAL_UP_INSERT | DBPROPVAL_UP_DELETE);
if (SUCCEEDED(user.Open(m_Session, _T("Users"), &ps)))
The above line fails with: DB_S_ERRORSOCCURRED
The session is opened succesfully and I can read records from hit (with CCommand).
The only thing I can think of is that the database is read-only, but it is not.