Forum Discussion
Sharepoint list update is not working sometimes
Hello all,
I have a sharepint list, and updating the list using access vba. I have a problem sometime the update works and sometimes it doesnot works, i have been trying to solve this problem using different commands like CurrentDb.TableDefs("shp_table").RefreshLink but unfortunately its not working.
I am using a loop with maybe 5 recordsets, sometime 4 gets updated, sometimes 5 my update command is right. Do you have some possible solution for this?
many thanks in Advance
BR
Arslan
Hi,
Do I understand the situation in your application right?
1. You have a form with a linked Sharepoint list as recordsource.
2. From within this form with a button or sth you are trying to update several records of the same list with your DAO.Execute statement.
3. You get error 3218 and you think it occurs for the currently active record in the form.
If that's correct then I would
a) not do a Refreshlink for the list or Refresh on the form in every iteration of the loop where you do the Execute.
b) try if the updates work when you disconnect the form from the list while executing the update statement. Just as a hard test if the form is the culprite:
Me.Recordsource = ""
For i = 0 To UBound(arr_iID) - 1
CurrentDb.Execute "Update shp_tblName set Bestätigung_um = '" & Now & "' where ID = " & arr_iID(i), dbFailOnError
Next iMe.Recordsource = "shp_tblName"
Servus
Karl
****************
Access Bug Trackers
Access News
Access DevConMe.Refresh
- George_HepworthSilver Contributor
What does it mean to say that you want to "update" a SharePoint list? What, exactly, is supposed to be changed? How is it to be changed?
Show us the actual VBA code; we can't see it unless you provide a copy to look at.
- AAB_786Copper ContributorHello George,
thanks for the fast reply.
I am trying to update the sharepoint field (see the code below)
For i = 0 To UBound(arr_iID) - 1
CurrentDb.TableDefs("shp_Bestellformular").RefreshLink
CurrentDb.Execute "Update shp_tblName set Bestätigung_um = '" & Now & "' where ID = " & arr_iID(i) & " "
Me.Refresh
Next i
Sometimes, some elements gets updated sometime, nothing gets updated.
BR- George_HepworthSilver ContributorWhy do you think you need to refresh the link before executing the update query? What's the problem you are trying to solve with that?
The actual update looks appropriate except for one thing. It's a good idea to include dbFailOnError to cause an error message to be returned if an update fails. That way you know what actually caused it "not to work".
CurrentDb.Execute "Update shp_tblName set Bestätigung_um = '" & Now & "' where ID = " & arr_iID(i) & " ", dbFailOnError
If the update doesn't raise an error, it silently moves on.
Hi,
Are you on Windows 11 by chance?
I ask because I just got off the phone with someone who reported similar sounding "disruptions" to Sharepoint 365 for about 3 months, and according to him only on the Windows 11 systems. On the Win10 machines, everything works as it has for years.
Servus
Karl
****************
Access Bug Trackers
Access News
Access DevCon- George_HepworthSilver ContributorKarl, do you have any indication that this impact other applications, or only Access/SharePoint applications? It appears to be a Windows 11 "anomaly", but it's not clear if it is specific to the Access and SharePoint configuration.
Hi George_Hepworth ,
My Windows 11-related query was obviously about a different Sharepoint problem. Just as a follow-up that might help somebody else:
The company affected by frequent but irregular interruptions to Sharepoint informed me that the problems were most probably caused by the "Dell Optimizer". At least things have been running for 3 days without problems since they uninstalled that tool. According to Dell:
"Dell Optimizer is a software application that intelligently and dynamically optimizes the performance of your computer by using artificial intelligence(AI) and machine learning(ML)."
Fascinating what all unexpected and hard to detect can be involved in such problems.
Servus
Karl
****************
Access Bug Trackers
Access News
Access DevCon
- AAB_786Copper ContributorHello dear,
no i am not using Windows 11, it is Windows 10. As the connection is also not getting lost, but the recordsets get locked, after second, third time it works.
Servus
Arslan
- AAB_786Copper ContributorHello all,
i still have a same situation, any other solution for this problem?
BR- Jurgen_GeelenCopper ContributorMaybe you use relations between tables? My experience that this cause locked records. That is a reason I never use relations between tables if my tables are in sharepoint in combination with linked sharepoint tables in Access frontend
- AAB_786Copper ContributorThanks for your reply, no i am not using any relational tables, this problem arises only by update of a single table.