Re: Changes are not visible with ADO and MS Access.

From: name (user_at_nospam)
Date: 03/20/05


Date: Sun, 20 Mar 2005 03:50:23 -0500


"against MS Access 200"

http://en.wikipedia.org/wiki/2nd_century

Still working on it, eh ?

"Victor" <Victor@discussions.microsoft.com> wrote in message
news:5D11D91C-E567-4635-BD4C-27D6B4B83AE6@microsoft.com...
> Hi,
>
> I am using ADO2.5 with VB6 against MS Access 200. When I am making changes
> to a fileld in the Access table, and then read that table agian, - changes
> are not visible and I need one additional "dummy" query of the database
for
> the changes to come through.
>
> I guess there is an ADO buffer i need to flash out? Interesting enough I
> never had this problem with SQL Server.
> Please help.
>
> 1. Changing a field:
>
> Dim rs As New Recordset, sql As String
> sql = "SELECT nt_parent_id FROM T_Notes WHERE nt__id = " & id
>
> rs.Open sql, scnn, adOpenForwardOnly, adLockOptimistic
> rs!nt_parent_id = 0
> rs.Update
> rs.Close
>
> 2. "Dummy" quiery to flash out the buffer
>
> rs.Open sql, scnn, adOpenForwardOnly, adLockOptimistic
> rs.Close
>
> 3. Now the change to rs!nt_parent_id are visible
>
> rs.Open sql, scnn, adOpenForwardOnly, adLockOptimistic
> While not rs.EOF
> ......
>
> How to code it correctly, so this "dummy" query will not be needed?
>
> Thank you in advance.
>
>