Ladislav Margai
Ladislav Margai

Reputation: 1984

Power Automate - Execute stored procedure (V2) - returns always HTTP error 400

I have following stored procedure on the Azure SQL server:

ALTER PROCEDURE [dbo].[UpsertBuildDefinitions] (@Id int, @Name nvarchar(max), @Url nvarchar(max), @Revision int)
AS
BEGIN
    SET NOCOUNT ON
    SET IDENTITY_INSERT [dbo].[BuildDefinitions] ON

    IF EXISTS (SELECT * FROM [dbo].[BuildDefinitions] WHERE [Id] = @Id)
        UPDATE [dbo].[BuildDefinitions]
           SET [Name] = @Name,
                [Url] = @Url,
                [Revision] = @Revision
         WHERE Revision != @Revision;
 
    ELSE 
        INSERT INTO [dbo].[BuildDefinitions] ([Id], [Name], [Url], [Revision])
        VALUES (@Id, @Name, @Url, @Revision);

    SET IDENTITY_INSERT [dbo].[BuildDefinitions] OFF
END

In Power Automate (Microsoft Flow), I am calling it with the following inputs:

Execute stored procedure (V2) - INPUTS

And I am getting following output:

Execute stored procedure (V2) - OUTPUT

Output in text form:

{
  "status": 400,
  "message": "Invalid connection settings\r\n     inner exception: Not a valid data source.\r\nclientRequestId: c93ceeb5-dc4f-4a13-865d-abcfc51a17e9",
  "error": {
    "message": "Invalid connection settings\r\n     inner exception: Not a valid data source."
  },
  "source": "xxx.azurewebsites.net"
}

What does "Not a valid data source." exception means? What is wrong in my setup?

Upvotes: 0

Views: 4109

Answers (1)

Ansar
Ansar

Reputation: 396

You need to delete and re add the connection. Please check the below link for more details

https://powerusers.microsoft.com/t5/Building-Power-Apps/quot-Bad-Data-Source-quot-error-after-deploying-onto-other/td-p/422698

Upvotes: 1

Related Questions