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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
rimjhimgupta
Employee
Employee

"OLE DB or ODBC error: Exception from HRESULT: 0x80040E4E." error

In one of my Power BI reports, many views have suddenly started giving "OLE DB or ODBC error: Exception from HRESULT: 0x80040E4E." error on refreshing in Power BI desktop. No changes have been made to the database. In fact, the published reports are refreshing without any error. The error is coming only in Power BI desktop. how do i resolve this?

8 REPLIES 8
Syndicate_Admin
Administrator
Administrator

This drove me crazy for a day... my reports/dashboards would work on a different laptop, but not mine. After a lot of hair-pulling, I finally found something that worked instantly: https://community.fabric.microsoft.com/t5/Power-Query/The-underlying-connection-was-closed-An-unexpe...

 

Basically, remove the IPv6 checkbox on your WIFI settings.

cthomasflood
New Member

This drove me crazy for a day... my reports/dashboards would work on a different laptop, but not mine. After a lot of hair-pulling, I finally found something that worked instantly: https://community.fabric.microsoft.com/t5/Power-Query/The-underlying-connection-was-closed-An-unexpe...

 

Basically, remove the IPv6 checkbox on your WIFI settings.

Syndicate_Admin
Administrator
Administrator

I have a similar problem. I have a working Power BI Desktop file, fully refreshed (import from Access database files). I have also gone to the Transform Data page and refresh previewed all queries. Everything is working. Save, close, zip up the PBIX.

 

Reopen, refresh the data - A-OK no problem.

 

Close, unzip / replace the PBIX.

 

Reopen, refresh the data -

OLE DB or ODBC error: Exception from HRESULT: 0x80040E4E.

 

Sometimes I get a different error with the same steps. The error sometimes says that the database(s) are already in use.

 

Sometimes I get no errors and the refresh happens just as desired.

wongnicholas067
New Member

I faced the same problem too when I'm refreshing data. Is the same error poping out for multiple times. What I do is:
1. I open the "Transform Data" > Go to the sheet that have this error.

2. Click on "Advanced Editor"

3. Delete the query there. If you want to be saved, you might copy paste the query in the notepad.

4. After delete, click "Done".

5. Refresh data again. Or Get Data from the excel (Just the sheet taht contain error).

6. Do check your data tyep is whether got any mismatch or not. It will automatically sort out itself if successfully.

7. Close and Apply.

8. Template, Refresh Data again.

Syndicate_Admin
Administrator
Administrator

Hi @rimjhimgupta ,

 

I received a similar error upon refresh of my Power BI dataset when it was working fine in the past.  

 

I found a workaround as follows:

 

1. Use the Transform Data option from the Power BI desktop Home menu.

2. Click on your query that is producing the OLE DB/ODBC Error and select the Advanced Editor menu option.

3. Save a copy of your original logic that appears in the Advance Editor by copy/paste to Wordpad.

4. Comment out or remove a large portion of your query logic so that you leave a cutback version and click "Done" from within Advanced Editor to save the revisions.

5. Exit the Transform Data area by choosing the "Close and Apply" option.   

6. Your query will attempt to reload for the data refresh.  Determine if it is successful. If not then you need to keep commenting out the logic in it until you can get it to run successfully. 

7. Once you get the query to run successfully for your data refresh, go back into the "Transform Data" area and the Advanced Editor option and add back into the query the original logic, save and exit with the "Close and Apply" 

8. After performing the above steps, my original logic for the data refresh ran perfectly and the OLE/ODBC error disappeared. 

 

I realize this is an odd set of steps but it worked for me and had the least impact on my PBIX. 

Syndicate_Admin
Administrator
Administrator

Hi @Syndicate_Admin 

Please try do a manual refresh for each queries 
You can also try to do manually refresh for one of those queries and then Refresh all

 

I hope it will work

v-eqin-msft
Community Support
Community Support

Hi @rimjhimgupta ,

 

Any updates?

 

Best Regards,
Eyelyn Qin

v-eqin-msft
Community Support
Community Support

Hi @rimjhimgupta ,

 

Please open Power Query and navigate to the queries that are showing the error. Check each step within the query to find where the error is, then try to fix it or remove error rows and reload the data.

 

Similar issues:

Eyelyn9_0-1656318465398.png

 

Eyelyn9_1-1656318477568.png

OLE DB or ODBC error: Exception from HRESULT: 0x80040E1D | Power BI Exchange

Solved: 0x80040E4E Error - OLE DB or ODBC - Microsoft Power BI Community

Solved: OLE DB or ODBC error: Exception from HRESULT: 0x80... - Microsoft Power BI Community

Solved: REFRESH ERROR ''OLE DB u ODBC: Exception from HRE... - Microsoft Power BI Community

 

 

Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors