cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

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

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. 

3 REPLIES 3
Highlighted
Frequent Visitor

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

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?

Highlighted
Solution Sage
Solution Sage

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

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.

Highlighted
Frequent Visitor

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

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.  

Helpful resources

Announcements
firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

Join the new Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

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!

Top Solution Authors
Top Kudoed Authors
Users online (10,304)