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 / Flow SQL Connection - ...
Power Automate
Unanswered

Flow SQL Connection - Get Tables returns tables from a different database

(0) ShareShare
ReportReport
Posted on by 6

I have successfully set up a gateway and have working connections to 1 database in an on-premises SQL server express.

 

Today I created a 2nd database.  Flow allows me to create a connection through the gateway, but when I try to use the connection to Get Rows 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: bb881838-baf1-44c5-98d8-c671fa327804",
"source": "sql-ne.azconn-ne.p.azurewebsites.net"
}

 

If I run Get Tables with this connection, it returns a list of tables from database 1 instead of database 2 that the connection was configured for.  When I run get rows, the connection returns a correct list of tables to choose from database 2, however it errors as above.

 

If i run Get Rows and hand enter a table name from database 1 (not from the pull down list) I am able to retrieve data from database 1.

 

So it appears that the connection for Database 2 is actually pointing to Database 1, even though on Get Rows the list of available tables is from Database 2.

 

I'm not sure if I need a different version (paid) version of flow to manage multiple connections to different databases or if I've configured the gateway improperly?  Any help would be appreciated. 

Categories:
I have the same question (0)
  • MARKLIGON Profile Picture
    6 on at

    I've done some more work on this.

     

    The problem is that even though I have selected the correct connection (booksConnection)  for my target database (eg. books), when the flow runs it is using an entirely different connection (toysConnection).

     

    I am using SQL server express. 

     

    When I monitor the books database with the flow trigger that does something when a new record is created in the books db, it accurately returns the values entered in the database..

     

    Anybody?

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

    Hi @MARKLIGON ,

    Sorry for that, I can't reproduce the  issue on my side.

    I suggest you delete the connections of SQL sever and rebuild the connections for a try.

    Capture5.PNG

    Best Regards,

    Community Support Team _ Zhongys

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • MARKLIGON Profile Picture
    6 on at

    It's not feasible to just delete all of the existing sql server connections because I have live applications that rely on them, unless you think it will actually work.  

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!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 77 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 68

#3
Expiscornovus Profile Picture

Expiscornovus 56 Most Valuable Professional

Last 30 days Overall leaderboard