cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Dom32
Regular Visitor

SQL Server Execute Stored Procedure V2 error

Hello, 

 

I am just getting started using Power Automate and Power Apps (so real NEWBIE) and I am trying to use the SQL Server Execute Stored Procedure (V2) using a very simple SP (insert a new row in a table). After I select the server, database and stored procedure I get an error message : 'body" is required (see image below). What am I doing wrong?

 

I know my on premise gateway connection is working because I tested it with a SQL Server Insert row and that was working.

 

Any help/guidance would be much appreviated.

 

Thanks!

SQL_ESP_error.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
Dom32
Regular Visitor

Hi dvtkiet

 

I think the stored procedured requires at least one "INPUT" per the online documentation. I added an input to my stored procedured and I was able to use it with a button no problem.

 

https://docs.microsoft.com/en-us/connectors/sql/#execute-stored-procedure-(v2)

 

Hope it works for you.

 

Cheers

 

sql_SPv2.png

View solution in original post

7 REPLIES 7
fchopo
Super User
Super User

Hello @Dom32 

Which type of authentication do you use to connect to SQL Server? Maybe it's something with the connection. Could you provide more detailed information?

Ferran

Did I answer your question? Please consider to mark my post as a solution to help others.
Proud to be a Flownaut!
Dom32
Regular Visitor

Hi Ferran

 

the connection is using SQL authentication. I was able to get the Execute Stored Procedure V2 working using a Power Automate button. 

 

I just find it strange that it is not working with a Power Apps (even though they have a template for it). I would like to be able to trigger the SP within a Power App form.

 

thanks!

Hello @Dom32 

Really weird. Have you tested it with another SP just in case there's something with it? There's an excellent video on how to call SP from PowerApps here: https://powerusers.microsoft.com/t5/Webinars-and-Video-Gallery/Calling-Stored-Procedures-from-within...

Hope it helps!

Ferran

Did I answer your question? Please consider to mark my post as a solution to help others.
Proud to be a Flownaut!
Dom32
Regular Visitor

Hello group

 

well, I added a variable as input in my stored procedure to update one of the field and everything started working as expected. I guess I should have pay more attention to the "requirements" 🙂

 

Initially I was trying to execute the SP without a variable.

 

Sorry for your time, love this Power Automate stuff.

 

D

 

 
dvtkiet
Frequent Visitor

I have the same problem, and my stored procedure doesn't need any input parameter (it creates a table from different tables.
The stored procedure executes well in SQL; but when I call the stored procedure using Execute Stored Procedure V2, I get the error "Body is required."
Thank you in advance for your help.

Dom32
Regular Visitor

Hi dvtkiet

 

I think the stored procedured requires at least one "INPUT" per the online documentation. I added an input to my stored procedured and I was able to use it with a button no problem.

 

https://docs.microsoft.com/en-us/connectors/sql/#execute-stored-procedure-(v2)

 

Hope it works for you.

 

Cheers

 

sql_SPv2.png

View solution in original post

dvtkiet
Frequent Visitor

Hi @Dom32, It works. Thank you so much for your help and the documentation.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Users online (2,071)