Forum Discussion

StefaniaVargas's avatar
StefaniaVargas
New Member
1 year ago
Solved

ODBC error: numeric overflow or string truncation. Expected length 31, actual 63

Good day, Im having a error in power Query after the IT department connected Power BI to ODBC database. The error is the following: ODBC error numeric overflow or string truncation expected le...
  • v-ssriganesh's avatar
    1 year ago

    Hi StefaniaVargas,
    Thanks for posting your query in Microsoft fabric community forum.

    After thoroughly reviewing the details you provided, this error occurs when the actual data length exceeds the expected column length defined in the ODBC driver or database. Here are some steps you can try to resolve it:

    • The error message indicates that a column expects 31 characters, but your data has 63 characters. Can you verify with your IT team if the database schema has the correct column size?
    • Your method of truncating text columns is useful, but Power Query might still read the original column length. Try explicitly setting the column type.
    • Some ODBC drivers impose default character length limitations. Ask your IT team to review and increase the string column length in the DSN settings. Ensure you’re using the latest ODBC driver for your database.

    If this helps, then please “Accept it as a solution” and dropping a "Kudos" so other members can find it more easily.
    Thank you.

  • lbendlin's avatar
    1 year ago

    That error comes from the source. Check the column types in the source.