Skip to main content

Notifications

Power Automate - Using Connectors
Unanswered

Unable to insert row in SQL on premise

(0) ShareShare
ReportReport
Posted on by

I cannot insert a row in an on premise SQL database.

 

I get the following error: 

{
"status": 400,
"message": "The key didn't match any rows in the table.\r\n inner exception: The key didn't match any rows in the table.\r\nclientRequestId: 3cf2aec1-0c10-4f48-b6da-1710af2791cb",
"source": "sql-we.azconn-we.p.azurewebsites.net"
}

 

The gateways are upgraded to the latest version.

When I add the "insert row"-action, the database and its tables are being resolved.

There are no sql-triggers on the table. It's a simple table with just two columns.

 

I have an existing flow with an "insert row"-action to the same database and this one works fine, but each new flow that I create with this sql-action give me this error.

  • martinav Profile Picture
    martinav 3,340 on at
    Re: Unable to insert row in SQL on premise

    @Anonymous ,

     

    No, i do not have the ability to do anything with the tables.  They cannot be altered in any way because they are part of a purchased software system. 

     

    In fact, I am getting the same problem with actions I'm creating new from all tables and views I have tried from that same SQL instance.  BUT... I am using these tables in existing flows, and they are working.

     

    Of course, I will not be messing with those flows because I have had issues in the past that simply saving a flow during the time there was some sort of a Micorsoft issue with Flow was enough to kill the flow from subsequent execution.

  • Re: Unable to insert row in SQL on premise

    Did you recreate the table on the sql-server?

  • martinav Profile Picture
    martinav 3,340 on at
    Re: Unable to insert row in SQL on premise

    Yea, that is what I normally do as well with cases similar to this.  In my case, even creating the flow again from nothing yeilded the same result!!

  • Re: Unable to insert row in SQL on premise

    @martinav : I'm not sure, but I think that I've deleted the table, recreated it and that the error disappeared.

  • martinav Profile Picture
    martinav 3,340 on at
    Re: Unable to insert row in SQL on premise

    Having the exact same issue.  I have MANY SQL actions in other flows that are working.  I am trying to create new actions in a new flow (tried creating new twice) with the same ill result!

     

    @Anonymous , did you get a positive result?

  • Re: Unable to insert row in SQL on premise
    I already tried that, no success
  • v-bacao-msft Profile Picture
    v-bacao-msft on at
    Re: Unable to insert row in SQL on premise

    Hi @Anonymous,

     

    Perhaps you could consider configuring a new connection for this action and then giving the connection a new name.

    Please take a try again.

    Best Regards,

  • Re: Unable to insert row in SQL on premise

    Hi Barry,

    Authentication Type on my connection is already Windows.

    As I mentioned in my post, I have another flow which inserts rows to the same database without problems, this flow uses the same connection.

    Best Regards,

    Sam

     

  • v-bacao-msft Profile Picture
    v-bacao-msft on at
    Re: Unable to insert row in SQL on premise

    Hi @Anonymous,

     

    I did a test on my side and didn't meet the issue you mentioned.

    Image reference:

    1.PNG

    For reference, when I configure the connection, the Authentication Type selected is Windows.

    Please use Windows authentication to configure the connection and try again and see if issue still exists.

     

    Best Regards,

    Barry

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,422

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,711

Leaderboard

Featured topics