#BatchExecute command fails for MSSQL

1 messages · Page 1 of 1 (latest)

violet yoke
#

Hi Team,
When trying out batch execute command for an array of Insert queries, the operation fails with following error message,

Error while executing batch command starting with: \'INSERT INTO IDN_CLAIM_PROPERTY (LOCAL_CLAIM_ID, PROPERTY_NAME, PROPERTY_VALUE, TENANT_ID) \n                VALUES ( ? ,  ? ,  ? ,  ? )\'. The statement must be executed before any results can be obtained..

This does not happen when using MySQL and H2 databases.
Any input on this?

steel cairn
#

@balmy dove

balmy dove
#

Is this happening for MSSQL only?

violet yoke
#

Yes, this only happens when trying out with MSSQL, Works fine for MySQL and H2 databases.

balmy dove
#

Could you let us know the following,

  1. ballerina version - bal -v
  2. sql and mssql versions - Can be found in Dependencies.toml
violet yoke
#

Ballerina version

Ballerina 2201.2.3 (Swan Lake Update 2)
Language specification 2022R3
Update Tool 1.3.10

SQL - 1.4.1
MSSQL Driver

version = "9.2.1.jre11"
groupId = "com.microsoft.sqlserver"
balmy dove
#

I will look into this further and get back.

balmy dove
#

@gleaming wharf Could you check on this further?

gleaming wharf
#

Yes, sure