Error 0x80040e4e: OLE DB or ODBC [Exception from HRESULT]
Manually changing the data type of columns should help
- The error code 0x80040e4e occurs if there is a conflict between the data type of the columns autodetected in PowerBI.
- Manually changing the data type and deleting the data source cache will help fix the error code.
If you are here, you have encountered the error code 0x80040e4e with the following exception OLE DB or ODBC [Exception from HRESULT] when loading or refreshing an existing table in the PowerQuery on the PowerBI desktop.
Though the message itself does vaguely not offer any insight on how to resolve it, you can easily fix the error code 0x80040e4e by implementing the solutions covered in this article.
Why do I get the 0x80040e4e error code in PowerBI?
You will encounter the error 0x80040e4e: OLE DB or ODBC [Exception from HRESULT] in PowerBI due to one of the following reasons:
- Duplicate table in Power Query – If there is a duplicate table in PowerQuery, the error code in question is likely to show up.
- Special characters – Incompetency of PowerBI to handle the special characters in the database and create unusual encoding also causes the loading to fail with the error.
- Conflicting data type – If there is a conflict between the data type in the source with the data type of the column, the error code 0x80040e4e is likely to show up.
- Unnecessary relationships – This error may also occur if PowerBI auto-detects a needless relationship between CoE Settings and Environment.
How do I fix the error code 0x80040e4e in PowerBI?
1. Change the data type of the column
- Switch to the Home tab from the top menu bar and click to expand the Edit Queries drop-down followed by Edit Queries from the PowerBI ribbon to access the Power Query Editor window.
- Now, select the column for which you want to change the data type and click the left corner of the column header.
- Select the suitable data type for the current column from the list of supported data type that appears.
- A confirmation pop-up window to change the column type will pop up. Click the Replace Current button.
Generally, when a tabled gets loaded from a data source in PowerBI, the data type of the column gets detected automatically.
However, in some cases, there may be a contradiction when PowerBI applies the incorrect data type, especially for the columns with date data type causing the error 0x80040e4e: OLE DB or ODBC [Exception from HRESULT] in PowerQuery. Hence, changing the data type of the affected column should suffice.
2. Delete unnecessary relationships
- Cancel the table load in PowerBI such that Power BI will now load without any values.
- Switch to the Modeling tab from the top menu bar and choose the Manage Relationships option from the ribbon.
- Look for the relationship between Environments and CoE Settings in the list of all relationships and press the Delete button located at the bottom.
- Now Save and Close the dialog box and re-load the query.
Some PC issues are hard to tackle, especially when it comes to corrupted repositories or missing Windows files. If you are having troubles fixing an error, your system may be partially broken.
We recommend installing Restoro, a tool that will scan your machine and identify what the fault is.
Click here to download and start repairing.
The query should now load correctly without encountering the error 0x80040e4e in PowerQuery.
3. Remove duplicate columns from the table
- Open the table in question and click the topmost cell present before the column headers.
- Select the Remove duplicates option from the drop-down menu that appears.
Deleting the duplicates in multiple columns across the table will help get past the error code 0x80040e4e in PowerBI.
4. Clear the data source cache
- Launch the PowerBI desktop and choose File from the top ribbon.
- Choose Options and settings from the left navigation panel, followed by Options from the right sidebar.
- Select Data Load from the left panel of the new window.
- Look for the Clear Cache button under the Data Cache Management Options and Q&A Cache Options section and press the OK button.
- After you perform the above steps, the Currently used value will be set to 0 bytes. Now re-establish the connection with the required data sources and refresh the data query editor.
5. Clear Global Permissions
- Access the File tab located on the ribbon in PowerBI Desktop.
- Choose Options and settings from the left sidebar, followed by Data Source settings from the right.
- In the Data Source settings window, enable Global Permissions on the top, select the BI Connector from the list of data sources, and press the Clear Permissions button at the bottom.
- After you clear the PowerBI cache and data source settings, close all the instances of the Power BI desktop and re-launch it.
Cleaning the global permissions will clear the login credentials forcing you to set up a fresh connection. This will help fix the 0x80040e4e: OLE DB or ODBC [Exception from HRESULT] error when you refresh the table.
That’s pretty much it! You can try the methods listed in this guide to eliminate the error 0x80040e4e : OLE DB or ODBC [Exception from HRESULT] in PowerBI.
You may also want to fix the PowerBI data source credentials if they are greyed out for you.
Which of the tricks mentioned in this article worked in your case? We are curious to find out!
Still having issues? Fix them with this tool:
If the advices above haven't solved your issue, your PC may experience deeper Windows problems. We recommend downloading this PC Repair tool (rated Great on TrustPilot.com) to easily address them. After installation, simply click the Start Scan button and then press on Repair All.