Forum Discussion
OLE DB or ODBC error: Type mismatch. (Exception from HRESULT: 0x80020005)
- Anonymous7 years ago
Hi rocky09 ,
I had a similar report set up on the Power BI Service that failed to refresh but provided me with a more detailed error. It turns out one of the fields contains string values when the ODBC connection was expecting date. When I checked the set up for the original data source the field in question was shown as a string so I'm not sure where the change occured.
Luckily, in this instance, I think I'll be able to omit the field from the report as I don't think it's entirely necessary. Hopefully that will negate the issue.
Thanks,MarkJames
Hi All
I experienced the same error in the Desktop version, when changing the sources (excel file). The error occured due to a change in the excel file due to an update of the software that I extracted the data from.
Error message: OLE DB or ODBC error: Type mismatch. (Exception from HRESULT: 0x80020005)
The issue arised due to incorrect type of some date columns.
To fix the issue, go into Power Query Editor and right click on each column. Go to: Change Type and check what type each column is in your table.
In my case the issue arised because I had some date columns that had to be changed to the type Date. When the date columns were updated the error disappeared.
- martaTr2 years agoFrequent Visitor
why power bi cannot indicate where is a problem? i have 40 columns 😞 how can i check them one by one without loosing hours on that , that's crazy
- Anonymous2 years agoNot applicable
Agreed. I usually go into each datasource and make the primary and foreign keys all the same datatype, and that helps. PowerBI evidently remembers what the datatypes are for the rows of data that are appended, and sometimes, changing the datatype after you append doesn't change all the datatypes.
- José4 years agoRegular Visitor
Great! It worked out for me, but instead of date was with a numbers column, was appearing as string, changed it to whole number and worked.
- josepchile2 years agoNew Member
This also worked for me. I had several date and number columns in string format. I changed the format and worked. Thanks!