Skip to content
Advertisement

Tag: mssql-jdbc

Provide SSL certificate to SQL Server via JDBC

The Microsoft JDBC SSL documentation details the use of a Java keystore in order to specify a certificate bundle to use when validating the TLS connection. Is there a way to provide a certificate bundle without needing to store it within a JKS when connecting to a SQL Server database? Postgres seems to have a sslrootcert option which appears to

JDBC: Issue with rendering Danish specific characters: Ø,Å,Æ

Problem: Danish specific characters are displayed improperly(as non readable chars) Given: Database is Microsoft SQL server 2019, database collation is: Danish_Greenlandic_100_CS_AS. Data has been stored in Varchar column types, data has been already there; change collation or any data modification is not appropriate. I am not inserting data, only reading them(kind of report functionality). Everything is working fine on my

LocalDateTime and SQL Server JDBC 4.2 driver

I’m trying to use new java.time classes with most recent version of Sql Server JDBC driver. As I read it should just work with methods: PreparedStatement.setObject() and ResultSet.getObject(). So I created sample code, and can’t get it work with ResultSets. I don’t know what I’m doing wrong here. This throws an exception: com.microsoft.sqlserver.jdbc.SQLServerException: The conversion to class java.time.LocalDateTime is unsupported.

“NoClassDefFoundError: javax/xml/bind/DatatypeConverter” with SQL Server JDBC

I recently switched to intellij but I’m finding it hard to connect to my localDB. The same code worked on eclipse fine. Also I have already added the sqljdbc42.jar as a module dependency. Error produced: Any help would be greatly appreciated. I’ve also tried the overloaded DriverManager.getConnection(url, user, pass) method and same error. Answer For Java 9+ compatibility, you need

Advertisement