Weirdness with ODBC/DBI

Hi all,

For the past few months, I have been having issues querying my R to my team's SQL Server database (but had no problems until May)

Specifically, the connection seems to be made, but there are two primary issues:

  1. The scheme/tables in the Databases tab of RStudio are all pure gibberish - and are not the schema/table names that I'd find if I looked at it in a different viewer.

  2. When I do the queries, the queries give the right columns and column names, but incorrect contents (often there is a relationship between the correct data and the pulled, but I can't figure it out exactly.

I tried using Python to query (using pyodbc/SQLAlchemy/pandas read_sql() --- and the query is perfectly correct with no errors. But when I try using R (DBI/odbc) -- I can't get it.

It is possibly the same issue referenced here on github -- but there doesn't seem to be an answer there.

I am using Mac OS
Has anyone encountered this issue?

Which driver are you using? I've had issues with the proprietary Microsoft driver.

I've been using the Microsoft driver downloaded from here...maybe I'll try FreeTDS and see if that works - thanks for the suggestion @jbono!

1 Like

Nope -- FreeTDS does not work any better :frowning:. I still get the weird gibberish in the connections tab or when running DBI::dbLIstTables(conn)

I'll let you know if anything gets solved

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