cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
sandra1
Level: Powered On

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
sandra1
Level: Powered On

Re: Can not set variable for stored procedure V2 using Azure Database

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 Team
Community Support Team

Re: Can not set variable for stored procedure V2 using Azure Database

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.

sandra1
Level: Powered On

Re: Can not set variable for stored procedure V2 using Azure Database

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

Community Support Team
Community Support Team

Re: Can not set variable for stored procedure V2 using Azure Database

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
firstImage

New Ranks and Rank Icons in April

Read the announcement for more information!

firstImage

Better Together Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (5,034)