Category: JDBC
Posts of Category: JDBC
  1. Integrating H2 with Python and Flask

    Integrating H2 with Python and Flask Introduction H2 is a lightweight database server written in Java. It can be embedded in Java applications, or run as a standalone server. In this tutorial, we'll review why ...Learn More
  2. How to Get Last Inserted Record ID in MySQL Using Java (JDBC)

    How to Get Last Inserted Record ID in MySQL Using Java (JDBC) When we insert a record in a table that contains an auto increment column then we can easily obtain its id (primary key). Below example will show yo...Learn More
  3. Java SQLite Tutorial

    Java SQLite Tutorial In this tutorial you will learn about Java SQLite. SQLite is lightweight, zero configuration, serverless SQL database library. In this tutorial I will teach you how to use SQLite database w...Learn More
  4. How to Insert Date and Time in MySQL Using Java

    How to Insert Date and Time in MySQL Using Java In this example I will show you the simplest way to insert date and time in MySQL database using Java. This example is for inserting current date and time. You ca...Learn More
  5. Save and Retrieve Image from MySql Database Using Java

    Save and Retrieve Image from MySql Database Using Java Here you will get an example for save and retrieve image from MySql database using Java. In development we generally use folders for managing images. But w...Learn More
  6. Mysql jconnector spends 50% time in com.myql.jdbc.utils.ReadAheadInputStream.fill()

    I am profiling my application which uses Spring + Hibernate + mysql-java-connector. The visualvm shows that more than 50% CPU time is cost in com.myql.jdbc.utils.ReadAheadInputStream.fill(), when there are 1000...Learn More
  7. java.sql.SQLException: ORA-0094 caught when using quartz

    I am using quartz scheduler and now set jobstore to jdbcjobstore.JobStoreTX I use the same database to store my own data in this project and it works well including create new tables from code. Now the quartz p...Learn More
  8. Cannot connect mysql using netbeans 7.4

    i am trying to run a web application which uses mysql. But everytime i run the application i get the error "Communication link failure". and the stack trace is: Communications link failure The last packet sent ...Learn More
  9. MySQL and SQLite differences in SQL

    I'm writing java application that is using both SQLite and MySQL using JDBC. Are there any differences in SQL for those databases? Can I use same queries for both SQLite and MySQL, or is there any db specific ...Learn More
  10. mapping byte[] in Hibernate and adding file chunk by chunk

    I have web service which receives 100 Mb video file by chunks public void addFileChunk(Long fileId, byte[] buffer) How can I store this file in Postgresql database using hibernate? Using regular JDBC is very s...Learn More
  11. How to ignore all erroneous statements and execute all good ones in JDBC executeBatch?

    I have java.sql.Statement with lots of batch statements added with addBatch. Executing executeBatch will throw BatchUpdateException after first statement which violates database constrains and won't execute all...Learn More
  12. How to avoid storing passwords in the clear for tomcat's server.xml Resource definition of a DataSource?

    The resource definition in tomcat's server.xml looks something like this... <Resource name="jdbc/tox" scope="Shareable" type="javax.sql.DataSource" url="jdbc:oracle:thin:@yourDBserver.yourCom...Learn More