I've created an expenses app connected to an Azure SQL database which works well except for if users want to update a previously created item.
For some reason if I amend one of my own expenses, the item patches successfully but if anybody else updates their own, the patch does not apply to that entry in SQL.
Is this a known issue and if so, is there a workaround?
Thanks
Rob
I am geting the same error, Application is working fine with me. But when others try to use it they are getting error in Patch function. Could you plz elaborate the steps to check or give SQL database permission.
Thanks everybody for the responses and apologies for the late response. Unfortunately it appears I've wasted your time as the connection wasn't the issue at all.
Further testing found the problem only occured with certain types of update and investigation found this was due to the logic being applied (nested IF statements not working correctly). This is now fixed and everyone can update exactly what they should be able to.
Sorry for not checking in more depth before asking the question - not quite sure how to mark this closed now or who's answer to accept. Any hints?
Hi @robwhite ,
Based on the issue that you mentioned, I think this issue is related to SQL Table Access Permission rather than Patch function itself.
Please make sure these end users have proper Edit permission to your Azure SQL Table. Also please make sure you have shared the SQL Table connection to your end users.
If the issue still exists, please consider re-create a new connection to your Azure SQL Table from your app, then re-share your app to your end users, then check if the issue is fixed.
Best regards,
Go to make.powerapps.com and select the environment the app is located in. On the left navigation expand data and click on Permissions. Find your SQL database, click the ellipsis and select Share. Make sure your SQL database is shared with all the end users and that they all have "Can Edit" permission.
---
Please hit the "Accept as Solution" button if my post answered your question! If my post was helpful please consider giving it a "Thumbs Up."
Have you rechecked all of the permissions settings? Its still the most likely cause of the issue.
Thanks for the replies but I don't think that can be the issue as everybody can write to the database when creating the record initially. Additionally, the database connection is using a SQL authentication login not tied to my Office 365 user account either.
It is really baffling!
It appears as if we posted at the same time. Since we both came to the same conclusion its likely to be the solution. Great minds think alike!
If it works for you but not others this is likely a permissions issue. Be sure to check that users have the access to read/write in the tables for the app.
---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."
Hi @robwhite
It sounds like your users don't have write access to the Azure SQL database. Either add the permissions to the users in SSMS or in the Azure portal.
---
Please hit the "Accept as Solution" button if my post answered your question! If my post was helpful please consider giving it a "Thumbs Up."