Skip to content

Commit

Permalink
Added detailed comments to the registerOutParameter method to expla…
Browse files Browse the repository at this point in the history
…in the dynamic handling of DECIMAL output parameters.
  • Loading branch information
Ananya2 committed Jan 10, 2025
1 parent 4f3c020 commit ebf5093
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,9 @@ public void registerOutParameter(int index, int sqlType) throws SQLServerExcepti
param.setOutScale(7);
break;
case java.sql.Types.DECIMAL:
// Dynamically handle the scale for DECIMAL output parameters.
// The scale for the DECIMAL type is fetched from the ParameterMetaData.
// This provides flexibility to automatically apply the correct scale as per the database metadata.
ParameterMetaData parameterMetaData = this.getParameterMetaData();
if (parameterMetaData != null) {
try {
Expand Down

0 comments on commit ebf5093

Please sign in to comment.