web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / SQL Stored Procedure (v2)
Power Automate
Unanswered

SQL Stored Procedure (v2)

(0) ShareShare
ReportReport
Posted on by 17

When using SQL Stored Procedure (v2) Is it possible to fill out the databasename using a variable ?

I keep getting 

"message""The request entity's media type 'text/plain' is not supported for this resource."
Categories:
I have the same question (0)
  • Pstork1 Profile Picture
    68,678 Most Valuable Professional on at
    Re: SQL Stored Procedure (v2)

    Are you just typing the name in the blank, or are you using Enter Custom Value from the dropdown. You should be able to do it if you use the dropdown.

     image.png

  • RemyO Profile Picture
    17 on at
    Re: SQL Stored Procedure (v2)

    That is what i did. I initialized a variable contaning the database name.

    Then used:  Enter custom value in which i supplied the variable.

    Then added the 1 parameteri have (also by using a variable)

     

    Then i got the error: "message""The request entity's media type 'text/plain' is not supported for this resource."

  • Pstork1 Profile Picture
    68,678 Most Valuable Professional on at
    Re: SQL Stored Procedure (v2)

    What is the data type of the SQL parameter?  Does it work if you pick the database name from the dropdown without using a variable?

  • RemyO Profile Picture
    17 on at
    Re: SQL Stored Procedure (v2)

    - Datatype is string

    - If I use the dataname from connection it works.

     

    (I would like a variable since i have to connect to different databases)

  • Pstork1 Profile Picture
    68,678 Most Valuable Professional on at
    Re: SQL Stored Procedure (v2)

    I think the problem is that the stored procedure itself is different for each database.  Yes it can have the same name and the same definition, but in the SQL master table its a different object.  So if you use a custom string to connect to the database it can't pre-load the stored procedure schema.  I thought it might still work, but evidently it won't.

  • RemyO Profile Picture
    17 on at
    Re: SQL Stored Procedure (v2)

    It doesnt even work for a single one.

    Say my database is called test.

     

    If i select that database from the dropdown it works

    If i select that database using a variable it doesnt work.

    Why give me the option to use a custom variable if the functionality doesnt work ?

  • Pstork1 Profile Picture
    68,678 Most Valuable Professional on at
    Re: SQL Stored Procedure (v2)

    Just because all those dropdowns give you that option.  For some  things it works for others it doesn't.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Tomac Profile Picture

Tomac 497 Moderator

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 477 Super User 2025 Season 2

#3
chiaraalina Profile Picture

chiaraalina 242

Last 30 days Overall leaderboard