0

I've been trying to establish a connection to an MS Access database I have on my local hard drive using FreeTDS and UnixODBC. My ultimate goal is to open the connection in R via RODBC and implement some SQL scripts developed for this specific database to extract data. I've followed advice from this page (How do I install RODBC on Mac OS X Yosemite with unixodbc and freetds?), but am still having trouble.

When I implement isql in terminal I get the following error message.

[S1000][unixODBC][FreeTDS][SQL Server]Unable to connect to data source
[01000][unixODBC][FreeTDS][SQL Server]Unknown host machine name.
[ISQL]ERROR: Could not SQLConnect

I'm assuming my error is in how I've identified the host in my various setup files, which are as follows.

freetds.conf

[global]
;       tds version = 8.0
;       dump file = /tmp/freetds.log
;       debug flags = 0xffff
;       timeout = 10
;       connect timeout = 10
        text size = 64512

[my_db]
        # insert the actual host below
        host = My_computer_name.local 
        port = 1433
        tds version = 8.0

odbc.ini

[my_db]
Driver      = MSSQL
Servername  = My_computer_name.local
Port        = 1433
Database    = /filepath_to_db/my_db.mdb
TDS_Version = 8.0

odicinst.ini

[MSSQL]
Description   = Microsoft SQL Server driver
Driver        = /usr/local/Cellar/freetds/1.00.39/lib/libtdsodbc.so
Setup        = /usr/local/Cellar/freetds/1.00.39/lib/libtdsodbc.so
kanedan29
  • 3
  • 1
  • MS Access is designed to be used exclusively on Windows environments. Consider a like file-level database such as open-source SQLite, compliant in different OS and in R. – Parfait May 24 '17 at 16:47

1 Answers1

0

FreeTDS is for connecting to Microsoft SQL Server and Sybase databases. It is not designed to work with Microsoft Access databases.

Gord Thompson
  • 116,920
  • 32
  • 215
  • 418