Updates don't appear right away in new queries? 
Author Message
 Updates don't appear right away in new queries?

Hi,

Can anyone guess what's going on?  Using ADO, I produce RecordSets that I
either read directly from, or give to ADODB datasources.

I'm having problems when execute an UPDATE or INSERT.  I find that the next
SELECT doesn't usually pick up the new record, or changes.

I've also found:

* If I issue the very same UPDATE twice, then it will get picked up.
* If I execute the new SELECT from the event handler of a combo box, it
works fine.  But if I issue it programmatically, I don't get the new data.

Anyone know what's up here?

Thanks,
Robb

--
--
Robb Shecter
Senior Software Engineer
www.onsitetech.com



Tue, 28 Sep 2004 05:38:29 GMT  
 Updates don't appear right away in new queries?

Quote:

> Can anyone guess what's going on?  Using ADO, I produce RecordSets that I
> either read directly from, or give to ADODB datasources.

> I'm having problems when execute an UPDATE or INSERT.  I find that the next
> SELECT doesn't usually pick up the new record, or changes.

> I've also found:

> * If I issue the very same UPDATE twice, then it will get picked up.
> * If I execute the new SELECT from the event handler of a combo box, it
> works fine.  But if I issue it programmatically, I don't get the new data.

> Anyone know what's up here?

Does ADODB have any magic mystery settings to control write-back caching?

--
Joe Foster <mailto:jlfoster%40znet.com>  KrazyKookKultz! <http://www.xenu.net/>
WARNING: I cannot be held responsible for the above        They're   coming  to
because  my cats have  apparently  learned to type.        take me away, ha ha!



Tue, 28 Sep 2004 12:40:54 GMT  
 Updates don't appear right away in new queries?

Quote:
> > I'm having problems when execute an UPDATE or INSERT.  I find that the
next
> > SELECT doesn't usually pick up the new record, or changes.

> Does ADODB have any magic mystery settings to control write-back caching?

Hmm.  Good question.  I'm not sure that's it, though - it seems to really be
on the ADO SELECT that the changes are not propogated through.  (For
example, I've looked at the database and verified that the changes are
there.)


Wed, 29 Sep 2004 00:13:42 GMT  
 Updates don't appear right away in new queries?
I had similar problems with my project. You are probably opening up a new
connection for each transaction, one to execute the UPDATE command and then
one to read back the data. My experience has been that opening up a
different connection for each transaction can cause this problem, especially
when they are nearly instantanious operations.

One solution I have found is to use a DataEnvironment for everything,
including binding controls on forms, executing commands and opening
recordsets. It seems to keep everything syncronized. (The dataenvironment
allows you to define one connection object for all your
recordsets/commands). Unfortunately, you will find that the DataEnvironment
has it's own interesting (frustrating) tendencies...

Good luck!


Quote:
> > > I'm having problems when execute an UPDATE or INSERT.  I find that the
> next
> > > SELECT doesn't usually pick up the new record, or changes.

> > Does ADODB have any magic mystery settings to control write-back
caching?

> Hmm.  Good question.  I'm not sure that's it, though - it seems to really
be
> on the ADO SELECT that the changes are not propogated through.  (For
> example, I've looked at the database and verified that the changes are
> there.)



Wed, 29 Sep 2004 04:05:46 GMT  
 Updates don't appear right away in new queries?

Quote:

> > > I'm having problems when execute an UPDATE or INSERT.  I find that the
> next
> > > SELECT doesn't usually pick up the new record, or changes.

> > Does ADODB have any magic mystery settings to control write-back caching?

> Hmm.  Good question.  I'm not sure that's it, though - it seems to really be
> on the ADO SELECT that the changes are not propogated through.  (For
> example, I've looked at the database and verified that the changes are
> there.)

Are you using different connections for your queries?  Microslop
recommends using one connection object per process per database:

 URL:http://support.microsoft.com/default.aspx?scid=kb;;Q300216

--
Joe Foster <mailto:jlfoster%40znet.com>  Wanna buy a Bridge? <http://xenu.net/>
WARNING: I cannot be held responsible for the above        They're   coming  to
because  my cats have  apparently  learned to type.        take me away, ha ha!



Sat, 02 Oct 2004 04:32:59 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Modifications don't appear in the right window

2. Database updates don't appear...

3. Why don't my posts appear right away?

4. Right aligned text boxes don't right align

5. My projects containg toolbars don't appear Can't find COMCTL32.ocx

6. Dereferencing objects don't go away

7. Da De Da Don't fade away

8. Scripts don't go away...

9. Assign Temporary Where to a query - don't modify old query

10. DBCombo, I don't want update access update

11. Don't know if i'm in the right newsgroup

12. Created Objects Don't Appear In DB Window

 

 
Powered by phpBB® Forum Software