Open
Description
Driver version
latest
SQL Server version
mcr.microsoft.com/mssql/server:2022-latest
Client Operating System
any
JAVA/JVM version
any
Table schema
create procedure test_bigdecimal
@big_decimal_type decimal(15, 5) ,
@big_decimal_type_o decimal(15, 5) output
as begin
set @big_decimal_type_o = @big_decimal_type;
end;
Problem description
Hi! MSSQL driver don't allow to use prepareCall without brackets {}
Expected behavior
Like in pg, oracle, hsqldb, mariadb, mysql, snowflake, db2,
code below shouldn't cause exception:
var call = connection.prepareCall("""
call test_bigdecimal(100.24112, ?)""");
call.registerOutParameter(1, Types.DECIMAL);
call.execute();
Actual behavior
prepareCall works only with brackets
var call = connection.prepareCall("""
{call test_bigdecimal(100.24112, ?)}""");
call.registerOutParameter(1, Types.DECIMAL);
call.execute();
Error message/stack trace
Incorrect syntax near '@p0'
Any other details that can be helpful
JDBC trace logs
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Backlog