Changes are not visible with ADO and MS Access.

From: Victor (Victor_at_discussions.microsoft.com)
Date: 03/19/05


Date: Sat, 19 Mar 2005 05:47:02 -0800

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.



Relevant Pages

  • RE: transfer data from main form to subform
    ... "Gazza" wrote: ... > sorry but i dont quite understand what you mean by a dummy table. ... > or a query based on the product details table with only the 2 fields selected. ... and a textbox for the quantity. ...
    (microsoft.public.access.forms)
  • Re: Overview of data
    ... Dummy is the dummy table with one record for each desired time. ... After that I put this new query into my cross ... Is there another way to get this than with cross tab queries? ...
    (microsoft.public.access.tablesdbdesign)
  • Re: Overview of data
    ... Dummy is the dummy table with one record for each desired time. ... with all the times and a query that showed all ... Is there another way to get this than with cross tab queries? ...
    (microsoft.public.access.tablesdbdesign)
  • RE: Open a read-only form to a blank record
    ... form's load event; however, since it is read only, you can't do that. ... you will have to use a query that filters the dummy ... Another way would be to use a Union Query and create the dummy record in the ... FROM tblMdbList UNION SELECT Null As MDB_CLIENT, Null As MDB_REGION, Null ...
    (microsoft.public.access.forms)
  • Re: Preventing duplicates
    ... :>> parameterize it, and run the saved query from ASP. ... I created a dummy table, called dummy, same two fields. ...
    (microsoft.public.inetserver.asp.db)