flute72080
Programmer
I am very confused with how ADPs handle recordset updates. I have tried poured over books and newsgroups, and I still cannot get data to update correctly. Any assistance would be greatly appreciated.
In order to allow a form, "Provision", to obtain the most recent updates made by other users, I added the following code to its OnCurrent event:
Dim rs As New ADODB.Recordset
Set rs = Forms("Provision").Recordset
rs.Resync adAffectCurrent, adResyncAllValues
While this technically solved my problem, it created another in that the resync took too long to run. So, I decided that I only needed to update the current record and replaced the last line of code with
rs.Resync adAffectCurrent, adResyncAllValues
This is the strange part: If user1 goes to a record that user2 has updated, he does not see the update and he gets a write conflict if he tries to update it. But, if user1 leaves that record and then comes back to it a second time, the changes are there and the record can be edited. This happens whether the RecordSource is a view or a stored procedure, or if I assign a RecordSet programatically.
Any thoughts?
In order to allow a form, "Provision", to obtain the most recent updates made by other users, I added the following code to its OnCurrent event:
Dim rs As New ADODB.Recordset
Set rs = Forms("Provision").Recordset
rs.Resync adAffectCurrent, adResyncAllValues
While this technically solved my problem, it created another in that the resync took too long to run. So, I decided that I only needed to update the current record and replaced the last line of code with
rs.Resync adAffectCurrent, adResyncAllValues
This is the strange part: If user1 goes to a record that user2 has updated, he does not see the update and he gets a write conflict if he tries to update it. But, if user1 leaves that record and then comes back to it a second time, the changes are there and the record can be edited. This happens whether the RecordSource is a view or a stored procedure, or if I assign a RecordSet programatically.
Any thoughts?