Hello,
We have an on-premise SQL Server 2012 SP3 database which has an insert stored proc which we are trying to run from Flow.
When we run the stored proc we get error 'The key didn't match any rows in the table'.
There are unique keys which are autogenerated and work properly. We have tested and used this stored proc hundreds of times outside of flow.
The permissions to access SQL Server appear to be ok as we have gone into SQL Profiler and confirmed Flow is hitting the db. We can see activity going against Sys tables to get the param info on stored procs.
We have also created a second, simpler stored proc with no parameters (just to test the params are not the issue) and that is getting the same error message.
We'd really like to use PowerApps and Flow with our on-prem SQL Server but there are constant roadblocks: cannot do inserts against views, can't have auto inserts/updates/deletes against tables with triggers so need to use stored procs. Now trying to use stored procs and getting errors. Hope someone can help!
Any help sincerely appreciated.
Thanks,
Dan
Hello lesotho72
did you get any solution of this issue?
If yes. Can you please share the solution.
I am also getting the same kind of error while using Store procedure in Microsoft flow to get the data in the flow.
I have tried to put manually the stored procedure name in the store procedure name and test the flow till that step flow working fine.
But in the next step where I grab the output of this stored procedure flow 'Execute stored procedure (V2)' flow not displaying output columns list in dynamic content. I am getting Returncode and I am not sure how to use this or is this correct way works the store procedure in Microsoft workflow.
I have attached the screenshot of the same as well.
v-yuazh-msft
GabrielStJohn
Ranjani
Any help sincerely appreciated.
Regards,
Mukesh
I take it this issue from 10-22-2018 still has not been solved. I have same issue myself. Any suggestions would be most welcome.
Hello, @v-yuazh-msft!
Thank you for posting a reply to a topic on the Microsoft Flow Community! It appears that the users who you have been engaging in this thread with are now awaiting your reply! Please follow-up on this thread ASAP.
Thank You!
-Gabriel
Microsoft Flow Community Manager
I m getting same error while running SQL on premise ,Storeprocedure in microsoft flow . can you please share the solution
@v-yuazh-msft - Please see my response with more details above. Apologies for not tagging you in that post for review.
Please let me know if additional details are required.
Thanks,
Dan
Hello, @lesotho72!
Thank you for posting a reply to a topic on the Microsoft Flow Community! It appears that the users who you have been engaging in this thread with are now awaiting your reply! Please follow-up on this thread ASAP.
Thank You!
-Gabriel
Microsoft Flow Community Manager
Hi Alice,
Thanks for your response. More details:
(1) Our goal is to use PowerApps to write data to an On-Premise SQL Server database. Leveraging Gateway to accomplish this. Would prefer to just use PowerApps to do this but read that you cannot have a table with a trigger automatically work with insert/updates/deletes in PowerApps. So, the workaround (that we read about) is to use Flow to run an insert stored proc.
(2) Technical screenshots including Gateway, Flow and error message are displayed below.
Thanks,
Dan
Hi @lesotho72,
Could you please share a screenshot of the configuration of your flow?
Could you please share more details about your requirement and the issue?
Please share more details so we would try to provide a proper workaround for you.
Best regards,
Alice
Michael E. Gernaey
497
Super User 2025 Season 1
David_MA
436
Super User 2025 Season 1
Riyaz_riz11
244
Super User 2025 Season 1