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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
rimjhimgupta
Microsoft Employee
Microsoft 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?

15 REPLIES 15
Sian
New Member

I had a whole slew of errors, including this one, on a report which used to work. I found this post and - rather than panicking and tampering with my data model - I filtered and fixed activities where the "related record" was blank.  The errors went away like magic. Start there folks!

ADWeaver
New Member

I was able to trace this issue back to a table where I added some entries and created a many to many relationship, that had previously been setup as a many to one relationship.  Once I corrected that table, the error went away.

DAXY_DIZZY
Regular Visitor

hey guys so the strangest way this worked... after trying literally everything in these forums I just created a new blank query and re-did all the Applied steps of my table one-by-one instead of copy-pasting the whole code from Advanced Editor. Then deleted the previous table with this error and did "Close and Apply".

 

Don't ask me how lol I'm just glad it finally worked and I don't have to lose any more hairs for now ⁠😅

TimoRiikonen
Helper V
Helper V

Here is a list that you can try:

1) Disable IP6
2) Upgrade the TLS version of your Power BI application to TLS 1.2 
3) Press Refresh All in Power Query Editor

4) Remove null values from your keys that you use connecting to other tables

5) Filter out errors from the table. Since Query Editor shows only 1000 line, the data error can be after that. By leaving in only error lines, you can debug this case.

6) Remove connections between tables

7) Rewrite merge commands: recreate merges you have with UI on the step just below them. Then delete them from the steps.
8 ) Comment out code until you succeed once, then return the code back
9) Simplify your M code: for example make merges by using SQL instead of doing it in M.

ArslanHussain
New Member

This error usually happen when you work different versions of PBI Desktop used for building the query and the one used to refresh the query, I fixed it by updating/reinstalling PBI Desktop to latest version on both systems and unload few queries (latest ones) and load them one by one.

zahlenschubser
Helper IV
Helper IV

As I am still having this issue on and off - primarily in home office and through VPN - and assume that I'm not alone with this, I thought I'd leave my 5 cents too.

I found the weirdest workaround that seems to solve it for me at least - reboot your computer.

 

I used to not fully shut it down but only put it in standby / energy save so it will be ready quicker the next day, and I ran into this issue. But today I tried a full reboot and for whatever dumb reason it works now without any trouble.

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.

Recently updated PBI desktop and downloaded a report built on a previous version then started to receive error saying I had errors in some of my DAX statements, disabled IP6 on both my NIC and Wifi, Works fine now.

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

Anonymous
Not applicable

Hi @rimjhimgupta ,

 

Any updates?

 

Best Regards,
Eyelyn Qin

Anonymous
Not applicable

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.

Top Kudoed Authors