This post explains the Spring JDBC configuration for accessing database in any Spring application. One or the most commonly used framework in java Spring gives support for ORM and JDBC, in this part we will look into configuration of JDBC with Spring. Continue reading “Spring JDBC configuration”
This post explains implementing datatables server side processing in java. Check out Datatables with Spring MVC example from my previous blogs to understand in details. In this post I will be explaining server side processing on datatables, that is loading data on demand in datatable using AJAX. Continue reading “Datatables server side processing in Java”
This is the simple example for executing the SQL statements to INSERT, UPDATE or DELETE any records from the database using JDBC. In the below code I have explained all the three operations. When we insert, update or delete any records from the database we are updating the database, hence we use the executeUpdate() function with the Statement.
One of the significant characteristic of any programming language is its connectivity with the database and its operations. Java supports many options to connect to the database and one of the most used database is MySql. JDBC (Java Data Base Connectivity) is used for connecting the java code with the database and it provides cross-DBMS connectivity to a wide range of SQL databases and access to other tabular data sources, such as spreadsheets or flat files. This tutorial shows the jdbc and mySql connection establishment and its use.
You may have come across “java.lang.ClassNotFoundException: com.mysql.jdbc.Driver” error/exception while working with java and JDBC. The error occurs mainly when we try to connect to the mySql database from our java code. The error message itself give the clear indication about what we are missing. It says that it is unable to find the Class – “com.mysql.jdbc.Driver”. Continue reading “Error: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver”