Hi,
I'm trying to run the Strategus package with Microsoft SQL Server, but I'm getting the following error when running the CohortGenerator module:
Error executing SQL:
com.microsoft.sqlserver.jdbc.SQLServerException: A result set was generated for update.
I found that this error occurs when createCohortTables() from the CohortGenerator package executes executeSql().
It seems that when a CREATE TABLE statement is executed, SQL Server returns a result set, which causes this error in R/JDBC.
I temporarily fixed this issue by using querySql() instead of executeSql() when executing a CREATE TABLE statement.
Is there any known workaround, or does anyone know why this happens?
Environment:
R version: 4.4.3 (2025-02-28 ucrt)
Platform: x86_64-w64-mingw32/x64
OS: Windows Server 2022 x64 (build 20348)
CohortGenerator version: 1.1.0
DatabaseConnector version: 7.1.0
Java version: 17.0.13
DBMS: Microsoft SQL Server
Thanks.
Hi,
I'm trying to run the Strategus package with Microsoft SQL Server, but I'm getting the following error when running the CohortGenerator module:
I found that this error occurs when
createCohortTables()from the CohortGenerator package executesexecuteSql().It seems that when a
CREATE TABLEstatement is executed, SQL Server returns a result set, which causes this error in R/JDBC.I temporarily fixed this issue by using
querySql()instead ofexecuteSql()when executing aCREATE TABLEstatement.Is there any known workaround, or does anyone know why this happens?
Environment:
Thanks.