Reputation: 648
I'm trying to connect to a firebird database using the library RODBC
. Since I don't have much, if any, experience with databases and RODBC
I'm struggling with it.
I'm using the ODBC driver ODBC_2.0.5.156_x64
.
Here is what I tried:
library(RODBC)
path.to.fdb <- "C:/TEMP/local.fdb"
p <- paste("DRIVER=Firebird/InterBase(r) driver; DBNAME=", path.to.fdb)
odbcDriverConnect(p, case = "toupper")
And I get the error message:
1: Status 08004, Code -904, Message [ODBC Firebird Driver] Unable to connect to data source: library 'gds32.dll' failed to load
2: In odbcDriverConnect(paste(p, db, sep = ""), case = "toupper") : ODBC-Connection failed
Maybe that is a stupid question, but is somebody able to helb me? How may I connect to a local firebird database in R?
Here is the fdb file: https://drive.google.com/open?id=1Kw53B-_DsUW1O1Q5GrMnUFrtsBzDoAwn
Upvotes: 1
Views: 2634
Reputation: 109264
To be able to use Firebird ODBC you need three things:
fbclient.dll
(or libfbclient.so
on Linux), sometimes gds32.dll
), again this must be the same bitness as the ODBC driver and the application. On Windows, the client library can be installed using the Firebird server installer.Check the Firebird ODBC driver documentation for configuration details.
Upvotes: 1
Reputation: 59
For those who are still struggling to achieve a successful connection check this up:
After that you can simply do:
conn <- odbcConnect("your_db_name_in_odbcad32.exe")
data <- sqlQuery(conn, "SELECT * FROM some_table")
Have fun!
Upvotes: 0