Recently, the Microsoft SQL Server I am using has been upgraded from version 16.0.1000.6 to version 2022 (16.00.4175), and the dbSendQuery() function started to produce the error message:
Error: nanodbc/nanodbc.cpp:1769: 42000: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Invalid object name '<TABLENAME>'. [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Statement(s) could not be prepared.
<SQL> 'SELECT * FROM <TABLENAME>'
I tested the query in the same R session with other databases running older versions, and they worked without issues. I am using version 1.2.3 of the "DBI" package from CRAN.
I'm wondering if this might be a bug that requires a patch.