I have successfully installed cohortMethod on my VA computer. But I have
problem to use the module “DatabaseConnector.”
The following code failed to connect our VA CDW datasource.
library(DatabaseConnector)
conn <- createConnectionDetails(dbms=“sql server”,
user=“vhaNN\vhaslcxxx”, password=“123456”,
server=“vhacdwYYYY.zzz.www.va.gov”,
schema=“PBM_XXXXXX”)
channel <-connect(conn)
Connecting using SQL Server driver
Error in .jcall(drv@jdrv, “Ljava/sql/Connection;”, “connect”,
as.character(url)[1], :
java.sql.SQLException: Login failed for user ‘vhaNN\vhaslcxxx’.
But if I directly use RJDBC based on JTDS drive, it works!
library(RJDBC)
drv <- JDBC(“net.sourceforge.jtds.jdbc.Driver”, “C:/jtds/jtds-1.3.1.jar”)
conn1 <- dbConnect(drv, “jdbc:jtds:sqlserver://vhacdwYYYY.zzz.www.va.gov
:1433;databaseName=PBM_XXXXXX;user=
vhaslcxxx;password=123456;domain=vhaNN”)
dbListTables(conn1)
[1] “All6_Sep14Jan15_0Day_DiagDate”
We know that “DatabaseConnector” is a wrapper of RJDBC. My Question is
what java driver is under the module "DatabaseConnector² and do we need to
do some configuration work to make “DatabaseConnector” work?