ADO thinks DBMS is done, but DBMS ain't done 
Author Message
 ADO thinks DBMS is done, but DBMS ain't done

I have 2 Recordsets on 2 different applications communicating with the same
database

-=The first Recordset is opened with=-
m_pGlobal_RS->Open(adCmd, m_pConnection.GetInterfacePtr(), adOpenKeyset,
adLockPessimistic, adCmdText);

-=The second Recordset is opened with=-
local_RS->Open(adCmd, m_pConnection.GetInterfacePtr(), adOpenKeyset,
adLockReadOnly, adCmdText);

* adCmd is a simple SELECT statement that is the SAME for both recordsets.

The code order is roughly this

Open m_pGlobal_RS
...
...
Change fields on m_pGlobal_RS
...
...
MoveNext on all rows of m_pGlobal_RS until EOF then MoveFirst  // since
pessimistic every row op sends update
..
..
I then fire an event to another application which opens local_RS.

It is random whether the data opened by the second RS is the pre-update data
or the post-update data. How can this be? I opened the connection
with the default  synchronous option, isn't this asynchronous behavior?

Thanks for the help,
-=Adog



Mon, 08 Jul 2002 03:00:00 GMT  
 ADO thinks DBMS is done, but DBMS ain't done
Ok, found my answer...ADO connections maintain a cache so all connections
not involved with the update must be flushed via the JRO.JetEngine object.

Quote:

> I have 2 Recordsets on 2 different applications communicating with the
same
> database

> -=The first Recordset is opened with=-
> m_pGlobal_RS->Open(adCmd, m_pConnection.GetInterfacePtr(), adOpenKeyset,
> adLockPessimistic, adCmdText);

> -=The second Recordset is opened with=-
> local_RS->Open(adCmd, m_pConnection.GetInterfacePtr(), adOpenKeyset,
> adLockReadOnly, adCmdText);

> * adCmd is a simple SELECT statement that is the SAME for both recordsets.

> The code order is roughly this

> Open m_pGlobal_RS
> ...
> ...
> Change fields on m_pGlobal_RS
> ...
> ...
> MoveNext on all rows of m_pGlobal_RS until EOF then MoveFirst  // since
> pessimistic every row op sends update
> ..
> ..
> I then fire an event to another application which opens local_RS.

> It is random whether the data opened by the second RS is the pre-update
data
> or the post-update data. How can this be? I opened the connection
> with the default  synchronous option, isn't this asynchronous behavior?

> Thanks for the help,
> -=Adog



Fri, 12 Jul 2002 03:00:00 GMT  
 ADO thinks DBMS is done, but DBMS ain't done

Quote:

> Ok, found my answer...ADO connections maintain a cache so all connections
> not involved with the update must be flushed via the JRO.JetEngine object.

Ahaaaaaaa.....

That's very interesting. So if you've got, say, 3 connections open to the same
database, and you know damn well that only one of them is going to have
anything in it's cache, because it's the only one that's been used in anger so
far.... then that's the one connection that DOESN'T need refreshing?????

I've got a model of cache purging in my mind which is clearly from a different
era :-)

Roger Morton



Sat, 13 Jul 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Help with What I think can't be done

2. ADO and SQL: what am I doing wrong ?

3. ADO Data Control - What Am I Doing Wrong?

4. CA-Realizer DBMS like VB-ACCESS ???

5. I dont think this can be done

6. DBMS object models and date formats

7. Recommended DBMS

8. Which DBMS should I use?

9. Job Opening: DBMS Magazine Tech Editor

10. Wanted: Microsoft Intranet customer for DBMS Magazine case study

11. Remote DBMS access probl

12. Remote DBMS access problem

 

 
Powered by phpBB® Forum Software