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

Power Apps to SQL Server connection error Bad Data source Inner exception, Not a valid data Source

Hi,

 

I know there is another topic with this name (Power Apps to SQL Server connection error Bad Data... - Power Platform Community (microsoft.com), however the resolution in that topic doesn't work for me. Basically what I have noticed is that the working tables have squared brackets around the words

 

adriancristea_0-1620413308724.png

 

However, running the app with them started throwing the errors in the subject. When trying to remove and re-add the tables, they only come back without the brackets:

 

adriancristea_1-1620413422298.png

This screws up all my tables, if I go in and amend the table names in my formula, it works. But I have over 150 pieces of code. Not only that, but this is in UAT, I'm worried that changing the entire code and moving the app in Prod would require changing the code again.

 

Anyone else had this issue and how did they manage to overcome it, please?

 

PS. I did remove all SQL connection instances and turned off the enhanced SQL connector option in Setting, didn't help.

 

PPS. I so wish PowerApps would allow us to rename the connections, it would have saved me a big deal of hassle.

 

Thank you.

Adi

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
timl
Super User
Super User

@adriancristea 

Following a recent change in the naming convention that Power Apps uses to add SQL Server tables and views, the object names no longer include the schema name and brackets (as you've discovered).

Given the number of references you have to existing table names, I would consider extracting the source code for your app and renaming the tables that you re-added to match the existing references with the brackets.

There are more details on how to do this in my post here.

http://powerappsguide.com/blog/post/how-to-rename-data-source

 

 

View solution in original post

2 REPLIES 2
timl
Super User
Super User

@adriancristea 

Following a recent change in the naming convention that Power Apps uses to add SQL Server tables and views, the object names no longer include the schema name and brackets (as you've discovered).

Given the number of references you have to existing table names, I would consider extracting the source code for your app and renaming the tables that you re-added to match the existing references with the brackets.

There are more details on how to do this in my post here.

http://powerappsguide.com/blog/post/how-to-rename-data-source

 

 

adriancristea
Frequent Visitor

@timl, thanks for the answer and solution. I ended up just manually changing the datasources, thank God for being inspired enough to use collections throughout the entire app, therefore only needed to change the datasource mentions at collection creation and in the patch formulas. Still unhappy about it though, this should have been made well known and a solution to change the names provided. 

 

Well, that was fun, hope it helps others with the same issue.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Top Kudoed Authors
Users online (4,555)