Forum Discussion

jcountryman's avatar
jcountryman
Helper I
7 years ago
Solved

ODBC Error - Key value in connection string too long

Odbc.Query( "driver={iSeries Access ODBC Driver};" & "system=AS400.OURCOMPANY.COM;" & "dsn=dBASE Files" , "SELECT * "& "FROM AS400DB.JOBSCOPEDB.EPOPERF" ) I can run this quer...
  • jcountryman's avatar
    7 years ago

    Seems like my problem is that the dsn property needs to be "dBase File" in Power BI— although Power Query from Excel will accept an 's' or not.  "dBASE Fileblargablarg" because it truncates the string to the first ten characters.

     

    SMH.

  • Linda_MILF's avatar
    3 years ago

    Hi There, 

    Just wanted to offer a nice solution I found on another site for the warning "DataSource.Error: ODBC: ERROR [HY000]... The key value in connection string too long.

    After resolving it, I propose that you do not assume that it is due to a problem with the connection string, but rather to an error in setting a user name and password for the query. 

    This is the solution from 

    mikefiorentinoit from Reddit.com
     

    Open spreadsheet

    Click on Data

    Click on Queries and Connections

    Double - Click on any of the connections

    In the Power Query editor, click on File, Options and Settings, Data source settings, Click on dsn="?", Click on edit Permissions, Click edit, update user name and password., Click Save, Ok, Close, Click Close and Load, Close Queries and Connections window. Click on main sheet and click update button.

     

    I hope that this answer can be shared with anyone who requires assistance.