Skip to content

Commit ed0ff76

Browse files
authored
Added detailed comments to the registerOutParameter method to explain the dynamic handling of DECIMAL output parameters.
1 parent 6379d57 commit ed0ff76

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Diff for: src/main/java/com/microsoft/sqlserver/jdbc/SQLServerCallableStatement.java

+3
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,9 @@ public void registerOutParameter(int index, int sqlType) throws SQLServerExcepti
152152
param.setOutScale(7);
153153
break;
154154
case java.sql.Types.DECIMAL:
155+
// Dynamically handle the scale for DECIMAL output parameters.
156+
// The scale for the DECIMAL type is fetched from the ParameterMetaData.
157+
// This provides flexibility to automatically apply the correct scale as per the database metadata.
155158
ParameterMetaData parameterMetaData = this.getParameterMetaData();
156159
if (parameterMetaData != null) {
157160
try {

0 commit comments

Comments
 (0)