Error in .verify.JDBC.result(r, "Unable to retrieve JDBC result set for ", : Unable to retrieve JDBC result set for SELECT * FROM <table> (Invalid object name ',<table_name>'.)

Hi All,

I'm trying to connect to an MSSQL Server on network through RJDBC. However, while fetching results using dbquery and Select statement, am getting the following error:

Sample Code:

library(shiny)
library(shinydashboard)
library(lubridate)
library(ggplot2)
library(reshape)
library(scales)
library(RJDBC)
library(rJava)
library(DBI)
drv<-JDBC("com.microsoft.sqlserver.jdbc.SQLServerDriver","D:/R/mssql-jdbc-6.2.2.jre8.jar")
con<-dbConnect(drv,"jdbc:sqlserver://~sql server","Username","password")
gen<-dbGetQuery(con,"SELECT * FROM <table_name>")

Requesting help at the earliest as it is a critical issue stopping production.
Is there any service that needs to be started?

Thanks

It looks like you are not specifying the correct table name, you may have to prefix it with the schema and/or db name. e.g. db.schema.tablename.

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