You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
BacklogThe topic in question has been recognized and added to development backlogBugA bug in the driver. A high priority item that one can expect to be addressed quickly.
When updating an existing encrypted value on a char or varchar column and while sendStringParameterAsUnicode=false, the update fails. This works when sendStringParameterAsUnicode=true.
Expected behavior
The row update should succeed, and the new value should be in the table.
Actual behavior
Errors outs with the following message: The string is not in a valid hex format.
[java] com.microsoft.sqlserver.jdbc.SQLServerException: The string is not in a valid hex format.
[java] at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:233)
[java] at com.microsoft.sqlserver.jdbc.ParameterUtils.hexToBin(ParameterUtils.java:21)
[java] at com.microsoft.sqlserver.jdbc.AppDTVImpl$SetValueOp.execute(dtv.java:2043)
[java] at com.microsoft.sqlserver.jdbc.DTV.executeOp(dtv.java:1661)
[java] at com.microsoft.sqlserver.jdbc.AppDTVImpl.setValue(dtv.java:2296)
[java] at com.microsoft.sqlserver.jdbc.DTV.setValue(dtv.java:149)
[java] at com.microsoft.sqlserver.jdbc.Column.updateValue(Column.java:371)
[java] at com.microsoft.sqlserver.jdbc.SQLServerResultSet.updateValue(SQLServerResultSet.java:3172)
[java] at com.microsoft.sqlserver.jdbc.SQLServerResultSet.updateString(SQLServerResultSet.java:3486)
[java] at BugFixTests.AE_update_varchar8000_value_longer_than8000(BugFixTests.java:364)
[java] at BugFixTests.test_AE_update_varchar8000_value_longer_than8000(BugFixTests.java:85)
[java] at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
[java] at java.base/java.lang.reflect.Method.invoke(Method.java:580)
[java] at CVariation.execute(CVariation.java:68)
[java] at CTestItem.Execute(CTestItem.java:208)
[java] at TestDriver.runItem(TestDriver.java:106)
[java] at TestDriver.runItem(TestDriver.java:112)
[java] at TestDriver.runItem(TestDriver.java:112)
[java] at TestDriver.run(TestDriver.java:81)
[java] at TestDriver.main(TestDriver.java:253)
Repro code
The connection string needs sendStringParameterAsUnicode=false.
BacklogThe topic in question has been recognized and added to development backlogBugA bug in the driver. A high priority item that one can expect to be addressed quickly.
Driver version
All driver versions since AE and sendStringParametersAsunicode support.
SQL Server version
SQL Servers that support AE.
Client Operating System
Discovered on Windows 10.
JAVA/JVM version
Discovered on JDK 21
Table schema
Bug/issue applies to char/varchar types
Problem description
When updating an existing encrypted value on a char or varchar column and while
sendStringParameterAsUnicode=false
, the update fails. This works whensendStringParameterAsUnicode=true
.Expected behavior
The row update should succeed, and the new value should be in the table.
Actual behavior
Errors outs with the following message:
The string is not in a valid hex format.
Repro code
The connection string needs
sendStringParameterAsUnicode=false
.The text was updated successfully, but these errors were encountered: