cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper I
Helper I

Can not set variable for stored procedure V2 using Azure Database

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" ? 

1 ACCEPTED SOLUTION

Accepted Solutions
Helper I
Helper I

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. 

 

 

View solution in original post

3 REPLIES 3
Community Support
Community Support

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.

Helper I
Helper I

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. 

 

 

View solution in original post

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.

Helpful resources

Announcements
PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Top Solution Authors
Users online (5,800)