While executing a Sql Server stored procedure, it is expected to execute the print statement 1000 times, but it is improperly closing the loop in the middle when executing from Adeptia. If we execute stored procedure outside Adeptia (ssms or a sample Java program), then it is executing without any issues and giving the required output.
This issue comes up when using the SQL JDBC (sqljdbc jar)drivers to make the Database connection. Please use the SQL JTDS (jtds Driver jar) drivers and driver main class(net.sourceforge.jtds.jdbc.Driver) to make the Database connection and it will give the required output.
Database info URL: jdbc:jtds:sqlserver://DatabaseServerName:1433/DatabaseName;
Database Drivers JAR File: jtds-1.2.jar
Driver Main Class Name: net.sourceforge.jtds.jdbc.Driver