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.
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.
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.
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.
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?