Strange problem using OLE DB Consumer Templates
-
I'm writing a program to access the SQL SERVER using OLE DB Consumer templates. There was a strange problem found when I was trying to modify row data using CRowset::SetData method. Here is some key source code: CDBPropSet ps(DBPROPSET_ROWSET); ps.AddProperty(DBPROP_IRowsetChange,true); ps.AddProperty(DBPROP_UPDATABILITY,DBPROPVAL_UP_CHANGE | DBPROPVAL_UP_INSERT | DBPROPVAL_UP_DELETE); //... Ctheclass record; //class Ctheclass : public Command<CAccessor<CtheAccessor> > record.Open(session,_T("TABLE_NAME"),&ps) _tcscpy(record.column1,_T("Data to modify")); record.SetData(); The problem is that sometime these code runs ok and the row data has been modified as expected but sometime the row data did not changed even the SetData() method returned S_OK. Can any tell me if there is something wrong with my code or something I was missing.
Lisoft