Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

Update access database next recordset not grabbing update

I am having a problem where I am updating several rows in a table. I then set the connection to nothing and close it. After that I set a recordset to the rows that I just updated and it is not grabbing the correct information. I know that the rows get updated because when I set a breakpoint in the program I cant replicate the problem. Just not updating quick enough. Is there a way to know if the updates have finished or to be sure the recordset is cleared from the last time?

Any help thanks
[509 byte] By [DrunkenMunk] at [2007-11-11 9:51:07]
# 1 Re: Update access database next recordset not grabbing update
Not sure what is going on but you might try not closing and assigning your connection object to nothing. A recordset uses the connection object, so my guess is that it is simply returning the same data it had before, because the connection is no longer valid.
Ron Weller at 2007-11-11 23:43:38 >
# 2 Re: Update access database next recordset not grabbing update
you are right I am not closing the connection but I am closing the recordset. Either way the resolution to the problem was to change the recordset from a adodb to an ado. It turns out ado is faster or at least it is working for me.
DrunkenMunk at 2007-11-11 23:44:38 >
# 3 Re: Update access database next recordset not grabbing update
Do you mean DAO? because ADODB is ADO.
Ron Weller at 2007-11-11 23:45:41 >