From d4954b62d908f5a1a837681641f98828841e5da8 Mon Sep 17 00:00:00 2001 From: Jeff Wasty Date: Wed, 8 May 2024 14:23:46 -0700 Subject: [PATCH] I forgot how switches work ... --- .../java/com/microsoft/sqlserver/jdbc/SQLServerBulkCopy.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/microsoft/sqlserver/jdbc/SQLServerBulkCopy.java b/src/main/java/com/microsoft/sqlserver/jdbc/SQLServerBulkCopy.java index 897a6ab51..b868ba5fd 100644 --- a/src/main/java/com/microsoft/sqlserver/jdbc/SQLServerBulkCopy.java +++ b/src/main/java/com/microsoft/sqlserver/jdbc/SQLServerBulkCopy.java @@ -2672,7 +2672,8 @@ private void writeSqlVariant(TDSWriter tdsWriter, Object colValue, ResultSet sou tdsWriter.writeReal(Float.valueOf(colValue.toString())); break; - case MONEY8, MONEY4: + case MONEY4: + case MONEY8: // For decimalN we right TDSWriter.BIGDECIMAL_MAX_LENGTH as maximum length = 17 // 17 + 2 for basetype and probBytes + 2 for precision and length = 21 the length of data in header writeBulkCopySqlVariantHeader(21, TDSType.DECIMALN.byteValue(), (byte) 2, tdsWriter);