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
[BUG] PreparedStatement.executeBatch() When the Insert Sql Column Name Case Mismatch, Throws SQLServerException "Unable to retrieve column metadata."
#2588
Open
wooln opened this issue
Jan 21, 2025
· 0 comments
· May be fixed by #2589
Microsoft SQL Server 2019 (RTM-CU29) (KB5046365) - 15.0.4405.4 (X64)
Oct 23 2024 08:45:19
Copyright (C) 2019 Microsoft Corporation
Developer Edition (64-bit) on Linux (Ubuntu 20.04.6 LTS) <X64>
Client Operating System
openSUSE Leap 15.6 x86_64
JAVA/JVM version
java version 22
Problem description
PreparedStatement.executeBatch(), when the insert sql column name case mismatch, Throws SQLServerException "Unable to retrieve column metadata."
Column name use lower case c1, succeed con.prepareStatement("INSERT INTO varchartable1 (c1) VALUES(?)")
Column name use upper case C1, throws SQLServerException "Unable to retrieve column metadata." con.prepareStatement("INSERT INTO varchartable1 (C1) VALUES(?)")
Driver version
12.8.1
SQL Server version
Client Operating System
openSUSE Leap 15.6 x86_64
JAVA/JVM version
java version 22
Problem description
PreparedStatement.executeBatch(), when the insert sql column name case mismatch, Throws SQLServerException "Unable to retrieve column metadata."
create table, c1 lower case.
CREATE TABLE varchartable1 (c1 varchar(10))
executeBatch
Column name use lower case
c1
, succeedcon.prepareStatement("INSERT INTO varchartable1 (c1) VALUES(?)")
Column name use upper case
C1
, throws SQLServerException "Unable to retrieve column metadata."con.prepareStatement("INSERT INTO varchartable1 (C1) VALUES(?)")
The unit tests.
The text was updated successfully, but these errors were encountered: