JDBC with MS Access Database in Java 8

  • Since JDK 8, Java does not support ODBC driver for JDBC connectivity.
  • MS Access does not provide driver for JDK 8, therefore third party driver which is “UCanAccess” can be used to connect with MS Access database.
  • Download UCanAccess Driver.
  • Following is the way to connect with MSAccess database.
  • Please create the following table in Access : Student (Sno number, Sname Text(50), Scity(50))
import java.sql.*;

public class Main {

	public static void main(String[] args) throws Exception
		Connection conn = 
		String Q = "Insert into Student values (101,'raviroza.com','world wide web')";
			System.out.println("Recored added");
%d bloggers like this: