Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago

OLE DB or ODBC error: Type mismatch. (Exception from HRESULT: 0x80020005 (DISP_E_TYPEMISMATCH))

hey there, guys, someone please HELP me solve this problem im facing in Power Bi Desktop.

 

Everytime i change sources from one excel to another excel (because the datat needed to be updated, and i apply changes by clicking "CLOSE AND APPLY" from the Edit Query, i get this message EVERY SINGLE TIME:  

"OLE DB or ODBC error: Type mismatch. (Exception from HRESULT: 0x80020005 (DISP_E_TYPEMISMATCH))"

 

Its so anoying because i ve tried almost everything that ive read online, ive even noticed that my Filters dont seem be be chaging in the list of filters in "Page Level Filters" they seem to stick to the exact exact same at the previous excel document, (could that be the issue)

 

Im facing these two problems and i have a feeling that the filters showing up to be the same from my previous excel document, that it has something to do with a mismatch of not having the same text as my new colom for the filters from my new excel document.

 

For example:

 

Excel document 1 has the filter: "Text 1"

Excel document 2 has the filter: "Text 2"

I want the filter to show "Text 2"

Now ive change the soucre of excel in the EDIT QUERIES" page from Excel document 1 to Excel document 2.

When i got to apply the changes ive made in the EDIT QUERIES, the message: "OLE DB or ODBC error: Type mismatch. (Exception from HRESULT: 0x80020005 (DISP_E_TYPEMISMATCH))" comes up.

and when i go to  refresh, i cant, it gives me the same messages error.

and when i go to look at the filters in the PAGE LEVEL FILTERS, still no change and still has "Text 1" as filter and not "Text 2"

 

WHY

 

PLEASE HELP !!!

 

"I CANNOT FULLY UNDERSTAND WHAT IS THIS ERROR MESSAGE:

OLE DB or ODBC error: Type mismatch. (Exception from HRESULT: 0x80020005 (DISP_E_TYPEMISMATCH))"

 

Thanks,

Jason Kovac

 

5 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    I resolved this by:

    1. Save As a backup copy of your pbix file.
    2. Do Get-Data and point at the data source causing the problem in the backup copy.
    3. Make sure no problems in the query.
    4. Open Advanced Query Editor and copy contents
    5. Paste New Advanced Query into original file with the problematic query.

     

    Power Bi Reconnecting to the data source got the data types correct.

  • Anonymous's avatar
    Anonymous
    Not applicable

    HI Anonymous ,

    This issue appears when your data structure changes and data type conversion failed.(due to data type not matched)

    Can you confirm these files has same data structure?(e.g. data type, field name, separator... ) 

    Regards,

    Xiaoxin Sheng

    • Anonymous's avatar
      Anonymous
      Not applicable

      when you mean, "Data structure" can you give more details, im not sure i quite understand.

      • Anonymous's avatar
        Anonymous
        Not applicable

        HI Anonymous ,

        >>when you mean, "Data structure" can you give more details, im not sure i quite understand.

        It means you query table structure.(fields type, name, query steps...)

        BTW, you can also take a look at following link about same issue:

        OLE DB or ODBC error DISP_E_TYPEMISMATCH

        Regards,
        Xiaoxin Sheng

  • Summer080100's avatar
    Summer080100
    Icon for Microsoft Employee rankMicrosoft Employee

    Here is what I did when I met the issue. Go to transform data, then modify each column's type. Then save. At last, refresh.

    By doing this, the problem I met is resolved.