diff --git a/src/main/java/com/microsoft/sqlserver/jdbc/SQLServerCallableStatement.java b/src/main/java/com/microsoft/sqlserver/jdbc/SQLServerCallableStatement.java index c773c9f80..cf22b6a43 100644 --- a/src/main/java/com/microsoft/sqlserver/jdbc/SQLServerCallableStatement.java +++ b/src/main/java/com/microsoft/sqlserver/jdbc/SQLServerCallableStatement.java @@ -1279,7 +1279,7 @@ private int findColumn(String columnName) throws SQLServerException { // we should always have a procedure name part metaQuery.append("@procedure_name="); metaQuery.append(threePartName.getProcedurePart()); - metaQuery.append(" , @ODBCVer=3"); + metaQuery.append(" , @ODBCVer=3, @fUsePattern=0"); } else { // This should rarely happen, this will only happen if we can't find the stored procedure name // invalidly formatted call syntax. diff --git a/src/main/java/com/microsoft/sqlserver/jdbc/SQLServerParameterMetaData.java b/src/main/java/com/microsoft/sqlserver/jdbc/SQLServerParameterMetaData.java index 876495f44..555221ffa 100644 --- a/src/main/java/com/microsoft/sqlserver/jdbc/SQLServerParameterMetaData.java +++ b/src/main/java/com/microsoft/sqlserver/jdbc/SQLServerParameterMetaData.java @@ -289,8 +289,8 @@ private void checkClosed() throws SQLServerException { try (SQLServerStatement s = (SQLServerStatement) con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); SQLServerResultSet rsProcedureMeta = s.executeQueryInternal( - con.isKatmaiOrLater() ? "exec sp_sproc_columns_100 " + sProc + ", @ODBCVer=3" - : "exec sp_sproc_columns " + sProc + ", @ODBCVer=3")) { + con.isKatmaiOrLater() ? "exec sp_sproc_columns_100 " + sProc + ", @ODBCVer=3, @fUsePattern=0" + : "exec sp_sproc_columns " + sProc + ", @ODBCVer=3, @fUsePattern=0")) { // if rsProcedureMeta has next row, it means the stored procedure is found if (rsProcedureMeta.next()) {