This tutorial is regarding connecting your MS Access Database in Java Application Swing.
Here's the code example for the same:-
import java.sql.*;
public class DBTest {
public static void main(String[] args) {
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection conn = DriverManager.getConnection("jdbc:odbc:Test");
Statement st = conn.createStatement();
String sql = "Select * from Playlist";
ResultSet rs = st.executeQuery(sql);
while(rs.next()){
System.out.println("\n"+rs.getString(1)+"\t"+rs.getString(2)+"\t"+rs.getString(3)+"\t"+rs.getString(4));
}
} catch (Exception e) {
System.out.println(e.getMessage());
}
}
}
On this page of the site you can watch the video online Connecting Java with MS Access using JdbcOdbcDriver with a duration of hours minute second in good quality, which was uploaded by the user Param Singh 08 February 2014, share the link with friends and acquaintances, this video has already been watched 179,975 times on youtube and it was liked by 646 viewers. Enjoy your viewing!