You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Error when creating cohort tables using executeSql() on Microsoft SQL Server #335
As shown in the attached screenshot, running DatabaseConnector::executeSql() throws this error directly:
Error in .createErrorReport():
! Error executing SQL:
com.microsoft.sqlserver.jdbc.SQLServerException: 업데이트에 대한 결과 집합이 생성되었습니다. (which translates to "A result set was generated for update.") The table is created successfully despite the error.
This doesn't happen with DatabaseConnector 6.0.0 or earlier — it only started with the newer version. I also tested with both mssql-jdbc-9.2.0.jre8 and mssql-jdbc-13.4.0.jre8, and got the same behavior with both.
Also, this only happens in our internal network environment. When I run the same application against our external test environment with a sample dataset, it works fine with no errors.
Could this be related to the database version somehow?
Gemini suggests there may be DDL triggers configured on your server that cause the CREATE TABLE statement to generate a result set. You should be able to list any triggers using
When I run it against my SQL Server instance, querySql() doesn't throw — it just returns a message confirming the statement executed:
(which translates to "Table created successfully")
Hmmm, standard SQL Server configurations don't return a result set with that message, so it does seem there's something odd with the SQL Server instance you're using. There may be a system-level trigger instead of a database-level one. Could you try
SELECT*FROMsys.triggers;
This returns 0 rows on my SQL Server server.
Another possibility could be a database proxy, firewall, or third-party auditing tool sitting between your R session and the database. Your sys admin would know.
Activity
schuemie commentedon Jun 16, 2026
Hi @bdj5051!
That is weird, it should just work, and I am unable to reproduce it:
or
What version of the SQL Server JDBC driver are you using?
bdj5051 commentedon Jul 3, 2026
Thank you for checking.
As shown in the attached screenshot, running DatabaseConnector::executeSql() throws this error directly:
Error in
.createErrorReport():! Error executing SQL:
com.microsoft.sqlserver.jdbc.SQLServerException: 업데이트에 대한 결과 집합이 생성되었습니다. (which translates to "A result set was generated for update.") The table is created successfully despite the error.
This doesn't happen with DatabaseConnector 6.0.0 or earlier — it only started with the newer version. I also tested with both mssql-jdbc-9.2.0.jre8 and mssql-jdbc-13.4.0.jre8, and got the same behavior with both.
Also, this only happens in our internal network environment. When I run the same application against our external test environment with a sample dataset, it works fine with no errors.
Could this be related to the database version somehow?
schuemie commentedon Jul 3, 2026
Gemini suggests there may be DDL triggers configured on your server that cause the
CREATE TABLEstatement to generate a result set. You should be able to list any triggers using(On my test server this returns 0 rows)
bdj5051 commentedon Jul 6, 2026
Thanks for checking — I ran that query and got the same result as you:
I also tried adding SET NOCOUNT ON before the CREATE TABLE statement, but it made no difference — I'm still getting the same error.
schuemie commentedon Jul 6, 2026
Weird! Maybe you could see what the result is that the CREATE TABLE statement is generating?
(This throws an error on my SQL Server server because it returns no results)
bdj5051 commentedon Jul 14, 2026
When I run it against my SQL Server instance, querySql() doesn't throw — it just returns a message confirming the statement executed:

(which translates to "Table created successfully")
schuemie commentedon Jul 31, 2026
Hmmm, standard SQL Server configurations don't return a result set with that message, so it does seem there's something odd with the SQL Server instance you're using. There may be a system-level trigger instead of a database-level one. Could you try
This returns 0 rows on my SQL Server server.
Another possibility could be a database proxy, firewall, or third-party auditing tool sitting between your R session and the database. Your sys admin would know.