MSchmied
MSchmied

Reputation: 49

Trouble Connecting to DB2 Database with R error 1114

I've been trying to connect RStudio to a DB2 database and have been receiving the following error

rror: nanodbc/nanodbc.cpp:950: IM003: Specified driver could not be loaded due to system error  1114: 
A dynamic link library (DLL) initialization routine failed. 
(IBM DB2 ODBC DRIVER - DB2COPY1, C:\PROGRA~1\IBM\SQLLIB\BIN\DB2CLIO.DLL). 

I've been using this code

connection<-DBI::dbConnect(odbc::odbc(),Driver="IBM DB2 ODBC DRIVER - DB2COPY1", 
Server = "NRDCWIP6",uid="nxxx",pwd="Wxxx")

which has been working well for a different database (SQL server). I'm working in Windows 10 and don't have a lot of information about the database itself since it's managed by an IT group that's quite busy. I'm still quite new to connecting R to databases as well. I do know that the platform for the DSN is 32-bit, but when I look under the User DSN tab, it is listed as 32/64 bit.

enter image description here

enter image description here

I know 1114 is a rather well known error, but I'm not sure where the problem is and I've tried numerous variations of this code. Anything will help!

Upvotes: 0

Views: 2048

Answers (1)

hidehy
hidehy

Reputation: 304

Here may be the answer for this situation:
Specified driver could not be loaded due to system error 1114
https://www.ibm.com/support/pages/specified-driver-could-not-be-loaded-due-system-error-1114

Here is the key note from above:


Resolving The Problem

Launch the odbcad32.exe from the Windows/SysWOW64/ folder and ensure that you have the current driver for the database version you are connecting to, specified in the Data Source that is being used in the map


Hope this helps.

Upvotes: 1

Related Questions