Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
SupportLTW
Regular Visitor

Error refresh dataset

im getting an error on PowerBI service after refreshing the dataset. This error never appears and i didn't change anything. 

What do i have to do?

 

Onderliggende foutcode: -2147467259
Onderliggend foutbericht: ODBC: ERROR [HY000] [ma-3.1.13][10.3.31-MariaDB-0+deb10u1]Prepared statement needs to be re-prepared
DM_ErrorDetailNameCode_UnderlyingHResult: -2147467259
Microsoft.Data.Mashup.ValueError.DataSourceKind: Odbc
Microsoft.Data.Mashup.ValueError.DataSourcePath: dsn=Mariadb-Liteweb
Microsoft.Data.Mashup.ValueError.OdbcErrors: #table({"SQLState", "NativeError", "Message"}, {})
Microsoft.Data.Mashup.ValueError.Reason: DataSource.Error
URI cluster: WABI-WEST-EUROPE-redirect.analysis.windows.net
Activiteits-id: 863dcc1d-8a26-482d-ac80-e1a762dc2c74
Aanvraag-id: b0d98055-8a12-e3cb-e4ce-79b52adb64f7
Tijd: 2022-05-09 09:31:58Z

1 ACCEPTED SOLUTION
v-luwang-msft
Community Support
Community Support

Hi @SupportLTW ,

Pls check your prepared statements.

Don't use VIEWS in prepared statements.

This seems to be an on-going issue

Views are messy to handle with Dynamic SQL

Earliest Bug was Cannot create VIEWs in prepared statements from 11 years ago. There was a patch put in to address it...

Another bug report, Prepared-Statement fails when MySQL-Server under load, states that error 1615 is not a bug when the underlying tables are busy. (Really ?)

While there is some merit to increasing the table cache size (See MySql error when working with a mysql view), it does not always work (See General error: 1615 Prepar...)

ALTERNATIVES Over a year ago, someone mentioned this in the MySQL Forum (MySql “view”, “prepared statement” and “Prepared statement needs to be re-prepared”).

Someone came up with the simple idea of not using the view in the prepared statement but using the SQL of view in a subqu.... Another idea would be to create the SQL used by the view and execute it in your client code.

These would seems to be better workarounds that just bumping up the table cache size.

 

 

Did I answer your question? Mark my post as a solution!


Best Regards

Lucien

View solution in original post

2 REPLIES 2
v-luwang-msft
Community Support
Community Support

Hi @SupportLTW ,

Pls check your prepared statements.

Don't use VIEWS in prepared statements.

This seems to be an on-going issue

Views are messy to handle with Dynamic SQL

Earliest Bug was Cannot create VIEWs in prepared statements from 11 years ago. There was a patch put in to address it...

Another bug report, Prepared-Statement fails when MySQL-Server under load, states that error 1615 is not a bug when the underlying tables are busy. (Really ?)

While there is some merit to increasing the table cache size (See MySql error when working with a mysql view), it does not always work (See General error: 1615 Prepar...)

ALTERNATIVES Over a year ago, someone mentioned this in the MySQL Forum (MySql “view”, “prepared statement” and “Prepared statement needs to be re-prepared”).

Someone came up with the simple idea of not using the view in the prepared statement but using the SQL of view in a subqu.... Another idea would be to create the SQL used by the view and execute it in your client code.

These would seems to be better workarounds that just bumping up the table cache size.

 

 

Did I answer your question? Mark my post as a solution!


Best Regards

Lucien

amitchandak
Super User
Super User

@SupportLTW , Provide the data sources details again under setting and try again.

 

Also, check if any other user faces the same issue - https://community.powerbi.com/t5/Issues/idb-p/Issues

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.