Manually changing the data type of columns should help
by Taiba Hasan
A postgraduate in Computer Applications, she is an avid technical writer who loves to craft content revolving around Windows, Android, and emerging technologies like SaaS. With How-To and… read more
Updated on
- 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.
The query should now load correctly without encountering the error 0x80040e4e in PowerQuery.
- Fix Msmdsrv.exe Error & High CPU Usage
- How to Enable Map and Map Filled Visuals in Power BI
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!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2022
01:55 AM
I meet same situation about «OLE DB or ODBC Error: [DataFormat.Error]», I read below reply and solved this problem.
My data source located a folder in company cloud driver, today I put a BI file into this folder then refresh data, I got this error information, when I remove this file everything back to normal.
Make sure data source folder clean and keep source file only.
Thanks for reply from chendo1981 and another anonymous user, I click «Like» for you.
Message 11 of 11
4,216 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2020
07:29 AM
Hi,
Yo have to alocate only xlsx into the folder to import in PowerBI, the rest of archives can´t alocate into this folder.
For example, if you import one folder whit more than one archives, and also, one archive, you have to separated both:
……descktop/archivo1.xlsx
……descktop/data/
Archivo1 doesn´t alocate in data folder.
Ciao
Message 10 of 11
8,396 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2018
06:50 PM
@Anonymous,
How about you re-connect to the folder in a new Power BI Desktop file?
Also please directly open the Excel file, check if you get restricted Access message, and check if the sheets are locked. Based on my research, the above error could occur due to the two aspects.
Regards,
Lydia
Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Message 2 of 11
13,936 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2018
12:28 AM
Thanks for the answer. None of the files are restricted and none of them have locked sheets.
I tried to re-load the folder in a new Power BI Desktop file (on another laptop) and had the following error:
«Failed to save modifications to the server. Error returned: OLE DB or ODBC error: [DataSource.NotFound] Excel Workbook: The ‘Microsoft.ACE.OLEFB.12.0’ provider is not registered on the local machine. The 64 bit Database Engine OLEDB provider may be required to read …xlsx. To download the client software… etc.»
I will get it installed today with our IT department and see if that helps, however I have it on my home pc and the file does not work there either.
Message 3 of 11
13,932 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2018
07:11 PM
@Anonymous,
Do you use 64 bit or 32 bit Power BI Desktop? Ensure that you install the correct version of Database Engine OLEDB provider, and the version matches Power BI Desktop.
In your scenario, uninstall Database Engine OLEDB provider, reboot machine,re-install Database Engine OLEDB provider. then check if the error still occurs.
Regards,
Lydia
Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Message 4 of 11
13,923 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2018
01:00 AM
I am trying to solve this problem on 2 computers at the same time (as I am waiting for IT to resolve my ticket on my corporate laptop.)
Computer (1) (home PC) I have x64 Office, x64 Power BI and x64 OLEDB provider. Still, I receive the error that the external table is not in the expected format.
I re-installed as you suggested and it did not worked.
Computer (2) (corporate laptop) I have x32 Office, x64 Power BI and no OLEDB provider (I guess 32 bit by default — waiting for IT to install it). I receive the error message to install the x64 OLEDB provider, but I guess I won’t be able to do that as there is x64 Office.
Data refreshing and Power BI in general worked perfectly on both machines with the current setup until the day before yesterday for months.
Message 5 of 11
13,920 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2018
12:36 AM
@Anonymous,
For the first computer, have you rebooted the machine?
For the second computer, please install 32 bit Power BI Desktop instead and install 32 bit ACE provider, then check if you get errors.
Regards,
Lydia
Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Message 6 of 11
13,914 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2019
02:15 AM
Hi Snoggi,
2 things helped me after all which I think you could try:
1) Check if you surely not have any hidden files in a folder which you pull in to your model as a datasource. Damaged xlsxes and any hidden files can mass up your dataflow. (I had those when I tried to save a file on our shared drive and had some network error in the meantime.) Easiest if you check in your query editor the list of files so you can easily spot whether there is something that does not make sense.
2) Delete the connections in your data model between your different tables, and re-make them.
Message 8 of 11
12,578 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2019
03:51 AM
Hello,
I have the same issue. re-install Office 365 but don’t fix the PB. No hidden File. I recreate Excel fils.
Any ideas ?
I am workind under the latest Windows 10 and the latest Office 365 on e VM Machine ( MAC) all softwares are up to date.
Bruno
Message 9 of 11
12,277 Views
Пользовательское соглашение
Политика конфиденциальности
© Николай Павлов, Planetaexcel, 2006-2023
info@planetaexcel.ru
Использование любых материалов сайта допускается строго с указанием прямой ссылки на источник, упоминанием названия сайта, имени автора и неизменности исходного текста и иллюстраций.
Техническая поддержка сайта
ООО «Планета Эксел» ИНН 7735603520 ОГРН 1147746834949 |
ИП Павлов Николай Владимирович ИНН 633015842586 ОГРНИП 310633031600071 |
Introduction:
Sometimes while refreshing our dataset in PowerBI or importing new data from existing sources we may encounter OLE DB or ODBC errors as shown in the image below. This might be due to caching issues. To solve this follow the steps:
Go to File tab on the ribbon in PowerBI Desktop , then click on About and check the PowerBI version, make sure it is the latest version if not update PowerBI.
If PowerBI version is latest, click on the dropdown arrow below the Transform Data button.
Click on Data source settings
Click on Global Permissions
Select the Data Source and click on Clear Permissions and click on close.
- Click on close and again select the data source as new and enter the credentials.
- This time the dataset would be loaded without errors.
- Hope this article helped
Related posts:
Share Story :
Пользовательское соглашение
Политика конфиденциальности
© Николай Павлов, Planetaexcel, 2006-2023
info@planetaexcel.ru
Использование любых материалов сайта допускается строго с указанием прямой ссылки на источник, упоминанием названия сайта, имени автора и неизменности исходного текста и иллюстраций.
Техническая поддержка сайта
ООО «Планета Эксел» ИНН 7735603520 ОГРН 1147746834949 |
ИП Павлов Николай Владимирович ИНН 633015842586 ОГРНИП 310633031600071 |
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2023
02:36 AM
this worked for me,
in PowerQuery I calculate integer from datetime (example: «2023-02-07 14:08:52» = «44964»)
then if i set column format in PowerBI to date i get error «0x80040E4E Error — OLE DB or ODBC»
if i set the format to whole number everything works correctly
so i guess problem is with data format…
hopefully it will help someone.
Message 33 of 34
32,294 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2022
08:10 AM
I’m pulling from a Dataflow and getting this same error and the same vaguely helpful error message.
Would be excellent if the error identified the fields in question.
Whatever is going wrong here is also not being caught by Table.RemoveRowsWithErrors() either.
Message 32 of 34
114,761 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2022
08:40 AM
I had the same issue, i had duplicated a table iun power query and this issue poppedup.
It worked for me when i cleared everything in the duplicated table advanced editor and replaced the content from first table(which i duplicated from), then it worked.
Hope this helps.
Message 31 of 34
126,856 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2022
06:22 PM
I followed these steps
Step 1: Go to the Model section from the left side of the Power BI Desktop
Step 2: Delete all the relationships amongst the tables that have been created by Power BI itself while you were working with the Power Query Editor
Step 3: Click ‘Refresh visual and data’ option in Home (besides the Transform Data button)
It worked and loaded the new data and also applied the automations done in the query editor.
Message 25 of 34
145,532 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2022
10:42 AM
This worked for us as well. In addition to the OLE ODBC error we were getting a note about not being able to find data sources we had deleted months ago and were not mentioned anywhere in the model. Thanks!
Message 29 of 34
110,712 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-17-2021
01:15 PM
Hey there, I ended up through a naive search on the same issue. The ‘Solution’ post gave me the right indication. It turned out be cause by the filename of the csv files, I was collecting from a sharepoint. Renaming the files, using alphanumeric characters only, solved it for me.
Message 24 of 34
235,539 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2019
11:43 PM
Hi,
I came across a similar problem but its source was duplicate data on a column that created a relationship with a different table. Even worse, he didn’t appear on the table causing the error.
Message 22 of 34
250,139 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-09-2017
10:47 PM
I am trying to get data from Google Analytics to Power Bi but for page and page views field I am getting ‘ failed to save modifications to the sever . Error returned: ‘OLE DB or ODBC error: [DataSource.Error] There was an internal error.. ;. Can you please help me with this issue
Message 21 of 34
364,685 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2017
11:03 PM
Hi @Anonymous,
It seems that the error throws out when you apply the changes, right? In your scenario, please try to update the desktop to the version 2.42.4611.901 released in 1/20/2017.
If issue persists, please try to share the sample folder data source and sample .pbix file to reproduce the issue if possible.
Best Regards,
Qiuyun Yu
Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Message 2 of 34
366,703 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2017
06:32 AM
@v-qiuyu-msft
After messing around with the file, I solved it. It has to do with character support, as I had cubic and degree sign on the code and it was read as «?». I changed the encoding to Western Europe and it is solved. But it was not intuitive, as the error code did not point to this. Anyway, I hope this may help someone with the same problem.
Thanks for your support.
Message 4 of 34
378,927 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2023
03:04 AM
Hi,
I know this thread is quite old, but maybe someone stumbles over this again. This error seems to have a broad spectrum of possible causes. In my case, it involved some tables being included in the incremental refresh and activating DirectQuery (Power BI Premium) to acquire the latest data. In a few DAX expressions, it broke the LOOKUPVALUE function, and it had a ripple effect on a few other tables.
Message 19 of 34
27,744 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2022
02:23 AM
I don’t understand this solution but have a similar problem. One of my errors is
So no mention of any column. And by the way there are no data type changes in the query editor.
Do you have any ideas how to fix? I may post this in a few places.
Thanks
Rob
Message 17 of 34
105,578 Views
Any time I modify a query in Power Query, refreshing the Power Pivot table that uses the Power Query Workbook connection fails with the following error:
The operation failed because the source database does not exist, the source table does not exist, or because you do not have access to the data source.
More Details:
OLE DB or ODBC error: The query ‘Table1’ or one of its inputs was modified in Power Query after this connection was added. Please remove and re-add the connection. This can be done by disabling and re-enabling download of ‘Table1’ in Power Query..
An error occurred while processing table ‘Table1’.
The current operation was cancelled because another operation in the transaction failed.
The error message says I can remove and re-add the connection by «disabling and re-enabling download» but I don’t see any way to do this in Excel 2010. Plus I don’t want to destroy any measures or relationships in Power Pivot.
fyi — I am using Excel 2010 so obviously I had to use «Existing Connections» to select the Power Query table workbook connection to load into Power Pivot. Also note that I do not load Power Query to worksheet.
Any ideas?
May 2023 Community Newsletter and Upcoming Events
Welcome to our May 2023 Community Newsletter, where we’ll be highlighting the latest news, releases, upcoming events, and the great work of our members inside the Biz Apps communities. If you’re new to this LinkedIn group, be sure to subscribe here in the News & Announcements to stay up to date with the latest news from our ever-growing membership network who «changed the way they thought about code».
LATEST NEWS
«Mondays at Microsoft» LIVE on LinkedIn — 8am PST — Monday 15th May — Grab your Monday morning coffee and come join Principal Program Managers Heather Cook and Karuana Gatimu for the premiere episode of «Mondays at Microsoft»! This show will kick off the launch of the new Microsoft Community LinkedIn channel and cover a whole host of hot topics from across the #PowerPlatform, #ModernWork, #Dynamics365, #AI, and everything in-between. Just click the image below to register and come join the team LIVE on Monday 15th May 2023 at 8am PST. Hope to see you there!
Executive Keynote | Microsoft Customer Success Day
CVP for Business Applications & Platform, Charles Lamanna, shares the latest #BusinessApplications product enhancements and updates to help customers achieve their business outcomes.
S01E13 Power Platform Connections — 12pm PST — Thursday 11th May
Episode Thirteen of Power Platform Connections sees Hugo Bernier take a deep dive into the mind of co-host David Warner II, alongside the reviewing the great work of Dennis Goedegebuure, Keith Atherton, Michael Megel, Cat Schneider, and more.
Click below to subscribe and get notified, with David and Hugo LIVE in the YouTube chat from 12pm PST. And use the hashtag #PowerPlatformConnects on social media for a chance to have your work featured on the show.
UPCOMING EVENTS
European Power Platform Conference — early bird ticket sale ends!
The European Power Platform Conference early bird ticket sale ends on Friday 12th May 2023!
#EPPC23 brings together the Microsoft Power Platform Communities for three days of unrivaled days in-person learning, connections and inspiration, featuring three inspirational keynotes, six expert full-day tutorials, and over eighty-five specialist sessions, with guest speakers including April Dunnam, Dona Sarkar, Ilya Fainberg, Janet Robb, Daniel Laskewitz, Rui Santos, Jens Christian Schrøder, Marco Rocca, and many more. Deep dive into the latest product advancements as you hear from some of the brightest minds in the #PowerApps space.
Click here to book your ticket today and save!
DynamicMinds Conference — Slovenia — 22-24th May 2023
It’s not long now until the DynamicsMinds Conference, which takes place in Slovenia on 22nd — 24th May, 2023 — where brilliant minds meet, mingle & share!
This great Power Platform and Dynamics 365 Conference features a whole host of amazing speakers, including the likes of Georg Glantschnig, Dona Sarkar, Tommy Skaue, Monique Hayward, Aleksandar Totovic, Rachel Profitt, Aurélien CLERE, Ana Inés Urrutia de Souza, Luca Pellegrini, Bostjan Golob, Shannon Mullins, Elena Baeva, Ivan Ficko, Guro Faller, Vivian Voss, Andrew Bibby, Tricia Sinclair, Roger Gilchrist, Sara Lagerquist, Steve Mordue, and many more.
Click here: DynamicsMinds Conference for more info on what is sure an amazing community conference covering all aspects of Power Platform and beyond.
Days of Knowledge Conference in Denmark — 1-2nd June 2023
Check out ‘Days of Knowledge’, a Directions 4 Partners conference on 1st-2nd June in Odense, Denmark, which focuses on educating employees, sharing knowledge and upgrading Business Central professionals.
This fantastic two-day conference offers a combination of training sessions and workshops — all with Business Central and related products as the main topic. There’s a great list of industry experts sharing their knowledge, including Iona V., Bert Verbeek, Liza Juhlin, Douglas Romão, Carolina Edvinsson, Kim Dalsgaard Christensen, Inga Sartauskaite, Peik Bech-Andersen, Shannon Mullins, James Crowter, Mona Borksted Nielsen, Renato Fajdiga, Vivian Voss, Sven Noomen, Paulien Buskens, Andri Már Helgason, Kayleen Hannigan, Freddy Kristiansen, Signe Agerbo, Luc van Vugt, and many more.
If you want to meet industry experts, gain an advantage in the SMB-market, and acquire new knowledge about Microsoft Dynamics Business Central, click here Days of Knowledge Conference in Denmark to buy your ticket today!
COMMUNITY HIGHLIGHTS
Check out our top Super and Community Users reaching new levels! These hardworking members are posting, answering questions, kudos, and providing top solutions in their communities.
Power Apps:
Super Users: @WarrenBelz, @LaurensM @BCBuizer
Community Users: @Amik@ @mmollet, @Cr1t
Power Automate:
Super Users: @Expiscornovus , @grantjenkins, @abm
Community Users: @Nived_Nambiar, @ManishSolanki
Power Virtual Agents:
Super Users: @Pstork1, @Expiscornovus
Community Users: @JoseA, @fernandosilva, @angerfire1213
Power Pages:
Super Users: @ragavanrajan
Community Users: @Fubar, @Madhankumar_L,@gospa
LATEST COMMUNITY BLOG ARTICLES
Power Apps Community Blog
Power Automate Community Blog
Power Virtual Agents Community Blog
Power Pages Community Blog
Check out ‘Using the Community’ for more helpful tips and information:
Power Apps , Power Automate, Power Virtual Agents, Power Pages
Introduction:
Sometimes while refreshing our dataset in PowerBI or importing new data from existing sources we may encounter OLE DB or ODBC errors as shown in the image below. This might be due to caching issues. To solve this follow the steps:
Go to File tab on the ribbon in PowerBI Desktop , then click on About and check the PowerBI version, make sure it is the latest version if not update PowerBI.
If PowerBI version is latest, click on the dropdown arrow below the Transform Data button.
Click on Data source settings
Click on Global Permissions
Select the Data Source and click on Clear Permissions and click on close.
- Click on close and again select the data source as new and enter the credentials.
- This time the dataset would be loaded without errors.
- Hope this article helped