
CDoaDatabase::Execute does not show results immediately
Hi,
I am calling CDaoDatabase::Exectue with an update query and immediately
calling a second application that creates a new recordset but mos of the
time the changes made with the Execute statement are not available when I
create the recordset.
Application 1:
m_pDatabase->Execute("UPDATE MyTable SET MyCounter = MyCounter + 1 WHERE
MyID = 1");
call second application using OLE which does the following:
Application 2
m_psetPrint = new CDaoRecordset(m_pOtherDatabase);
CString strSQL = "SELECT * FROM MyQuery";
m_psetPrint->m_strFilter = "MyID = 1";
m_psetPrint->Open(dbOpenDynaset, strSQL, dbReadOnly);
The problem is that when m_psetPrint->Open executes it does not show the
field MyCounter incremented. If I place a breakpoint anywhere in the
middle, then it will show the incremented value.
Thanks,
Jeronimo