Search code examples
azuredatabase-connectionpowerapps

Powerapps to Azure SQL Server connection sudden error Bad Data source Inner exception, Not a valid data Source


I've been working with Powerapps for about 3 to 4 months now, and this particular app I've created connects to 3 tables in an Azure SQL Server Database. It's been working great until today. This morning I logged in to edit a feature on the app and my galleries were empty with an error message saying: "Bad Data source Inner exception, Not a valid data Source".

My first thought was, something is off on the database, some planned work possibly during the night, but that's not the case, and the DB is working perfectly as I also use it in PowerBI.

I googled for the error and found several people with a similar issue, and most of them reported that deleting the Data Source connections from power apps and adding them again would fix the issue, as well as deleting and creating the Galleries again. I've performed both actions, and the same error returns. I tried creating a fresh new canvas app, with a gallery and a brand new connection to the Azure Sql DB and still got the same error. I've also tried to restore one of the oldest versions of the app, and I still got the same error. This to me all indicates there's a problem with the DB, but...when I publish the APP, and run the app after publishing, It works perfectly, and I have full usability of the app, which means the connection to the DB is actually working.

It feels like a bug to me. I'll share the screenshot of the error:

Error Message

I'm worried I will lose all my work, so if someone could help me, that would be great.


Solution

  • Finally, I got the solution for this issue. This are the steps I followed to solve the issue.

    1. Remove all the Database connectors from your app.
    2. Go to File -> Settings -> Advanced Settings -> Disable enhanced Microsoft SQL Server Connector.
    3. Add all your Database connectors back again.