Skip to content

Tag: jdbc

How does JDBC DataSource works?

I wondered how works method getConnection() at DataSource? I assume that DataSource calling DriverManager.getConnection every time when we call DataSource.getConnection with our properties that we setting in DataSource. Is that true? Answer The answers to your question can be deduced from the DataSource javad…

PrearedStatement executeUpdate() is not working

I’m new to JDBC and using the following code to update the row using MySQL JDBC driver. I have no idea why executeUpdate() is not updating the content in the database. Can anyone help me? Answer Your query string is wrong. It should be something like this: Look here for the proper syntax of update: http…

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…