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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Can not set variable f...
Power Automate
Answered

Can not set variable for stored procedure V2 using Azure Database

(0) ShareShare
ReportReport
Posted on by 39

Hello, 

 

I have a PowerApp that uses a Microsoft SQL Server through a datagateway. In the database I have created a stored procedure that is called by a flow. This stored procedure needs an input parameter called "year". 
Everything works fine, but I want to switch the database from a local server to Azure. So I created an Azure database with the same CREATE statements and the same stored procedures. 

I changed the source from flow and the input value field for the parameter "year" disappears and an error occurs saying that the datatype for the parameter "year" is invalid. 

So here is a picture of the flow using the local database: 

Inkedlocal_LI (2).jpg

And that's the flow after I changed the connection to the Azure database: 

Inkedazure_LI (2).jpg

I have all permissions for the Azure database and a stored procedure without parameters works fine.

I have also tried using the Azure stored procedure via SSMS and it works well. 

Is this an error or how can I set the parameter for the variable "year" ? 

Categories:
I have the same question (0)
  • v-alzhan-msft Profile Picture
    Microsoft Employee on at

    Hi @sandra1 ,

     

    I'm afraid that the Azure Database is not supported in the SQL server to execute stored procedure.

     

    Best regards,

    Alice       

     

    Community Support Team _ Alice Zhang
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • Verified answer
    sandra1 Profile Picture
    39 on at

    For those who have the same problem: 

    I used type numeric(4,0) for the variable year. 

    Now it works, after I changed the variable type to varchar in the stored procedure. 

     

     

  • v-alzhan-msft Profile Picture
    Microsoft Employee on at

    Hi @sandra1 ,

     

    Glad that your problem has been solved.

     

    Best regards,

    Alice       

     

    Community Support Team _ Alice Zhang
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 589

#2
Valantis Profile Picture

Valantis 459

#3
11manish Profile Picture

11manish 382

Last 30 days Overall leaderboard