CDoaDatabase::Execute does not show results immediately 
Author Message
 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



Sun, 03 Aug 2003 07:28:42 GMT  
 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



Sun, 03 Aug 2003 07:29:05 GMT  
 CDoaDatabase::Execute does not show results immediately
Look under ODBC settings Advanced and make sure ImplicitCommitSync is
set to YES

On Tue, 13 Feb 2001 15:29:05 -0800, "Jeronimo Bertran"

Quote:

>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



Mon, 04 Aug 2003 02:46:32 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Help me in showing a dialog immediately when main dialog shows

2. UserControl does not show on running form and properies do not show

3. C output not redirected immediately ??

4. Check result of "execute sp_helpuser user_name"

5. Worker Thread does not start immediately

6. Dumb Question about showing results in a text box

7. could not execute: path not found(Win32 error 3)

8. OnInitDialog and doing something after the window is shown

9. Show hour glass for time consuming operation executing in a back ground thread

10. CDoaDatabase and Access 2000

11. static member inheritance not doing what I want...

12. Class not registered when doing COM interop

 

 
Powered by phpBB® Forum Software