error in odbc after upgrading to R 4.2.0

I recently upgraded to R 4.2.0. Prior to that, I was running 4.1.0.

I connect to a database using odbc with the following parameters:
"Driver={SQL Server Native Client 11.0};Server='server';Database='db';Trusted_Connection=yes"

It has been working fine... until after the upgrade. The first time that I have attempted to run the script after updating to R 4.2.0 (and updating my packages), I get the following error:

Error: nanodbc/nanodbc.cpp:1021: IM010: [Microsoft][ODBC Driver Manager] Data source name too long

I have tried this both on RStudio and RGUI. My first guess was that it has something to with 4.2.0 and/or upgrading the odbc package.

I did test on another machine that is running R version 4.0.5 with mixed results. When I tried first using my usual credentials, I also got the same error. The version of odbc on that machine is 1.3.3. However, when I log in with admin credentials, I do NOT get the error. It so happens that it was accessing a lower version of odbc - version 1.3.2. I thought that this might be the issue, but when I ported over version 1.3.2 both to the regular credentials on that second machine (running R 4.0.5) and onto my regular machine (running 4.2.0), I am stilling getting the same error.

I checked with a database admin, and nothing has changed with regard to my database access (and I can still access the database with SQL Server Management Studio).

I did see this thread and saw that the user there was running 4.2.0; I don't know if it is connected. ERROR: state IM004 - Issues with odbcDriverConnect in RStudio:

Any suggestions would be much appreciated.

Thank you


This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.