Changes are not visible with ADO and MS Access.
From: Victor (Victor_at_discussions.microsoft.com)
Date: 03/19/05
- Next message: dfgasner_at_hotmail.com: "Trouble using Server Explorer in VB.Net 2003"
- Previous message: Rohit Wason: ""unspecified error" (-2147467259) from MSADORA"
- Next in thread: name: "Re: Changes are not visible with ADO and MS Access."
- Reply: name: "Re: Changes are not visible with ADO and MS Access."
- Messages sorted by: [ date ] [ thread ]
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.
- Next message: dfgasner_at_hotmail.com: "Trouble using Server Explorer in VB.Net 2003"
- Previous message: Rohit Wason: ""unspecified error" (-2147467259) from MSADORA"
- Next in thread: name: "Re: Changes are not visible with ADO and MS Access."
- Reply: name: "Re: Changes are not visible with ADO and MS Access."
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|