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

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

Post by Adog » Fri, 21 Jan 2000 04:00:00



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

 
 
 

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

Post by Adog » Tue, 25 Jan 2000 04:00:00


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.


> 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


 
 
 

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

Post by Roger Morto » Wed, 26 Jan 2000 04:00:00



> 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

 
 
 

1. I think I am doing something wrong

Hi, I am VB6 programmer using ADO but new to SQL7.
When I want to enter a new record in a milion record table do I have to make
a select * from tablename first (which takes a while) or is there a
different way to add data faster to that milion record table? I want to use
the addnew method or do I have to work with the INSERT INTO method.

Vincent

2. paradox and sql

3. How to tell WHO is doing the dbms work

4. ASSISTANCE

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

6. Corruption of Tables

7. Joins - What I'am doing wrong

8. Informix Command Line

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

10. Is this doing what I think it's doing?

11. Trigger doing UNLOAD to file OR calling Store Procedure doing the UNLOAD to file

12. Caché from InterSystems - doing wh at other MV vendors should be doing

13. DBMS 26 or DBMS 27 error