How to fix issue in prepapred statement on jdbc driver 12.6.1 jre11

Dhamodharan M 0 Reputation points
2024-05-10T13:49:21.6766667+00:00

Recently we have upgrade the SQL JDBC driver from version 4 to version 12.6.2 jre11 as we upgraded to 2022 SQL server. After changing the driver we are facing issue in prepared statement. The same code with 12.6.2 jre8 and java8 returning results . But with java 11 the driver 12.6.2 jre11 is not working .Its returning null at this line "statement = dbConnection.prepareStatement(sql);"

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
12,860 questions
{count} votes

1 answer

Sort by: Most helpful
  1. MikeyQiao-MSFT 650 Reputation points Microsoft Vendor
    2024-05-11T06:05:22.1633333+00:00

    Hi,Dhamodharan M

    Please ensure that your jar package files have been placed in the lib directory of the web server container.