
how i can access Microsoft Access database by java program ? if any package or jar file required then please specify it. please give java source code for such database connectivity in short

Java MS Access database connectivity
Follow these steps:
1)Go to the start->Control Panel->Administrative Tools-> data sources.
2)Click Add button and select the driver Microsoft Access Driver(*.mdb).
3)After selecting the driver, click finish button.
4)Then give Data Source Name and click ok button.
5)Your DSN will get created.
6) Restart your compiler and compile the given code. It will create table in MS access database.
import java.sql.*;
public class CreateTable {
public static void main(String[] args) throws Exception {
Connection conn = DriverManager.getConnection("jdbc:odbc:student");
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Statement st = conn.createStatement();
st.executeUpdate("create table employee (empid int,empname varchar(30));");
System.out.println("Table is created successfully!");
st.executeUpdate("insert into employee (empid,empname ) values (1,'Roseindia')");
System.out.println("Data is inserted successfully!");
st.close();
conn.close();
}
}