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());
}
}
}
Nesta página do site você pode assistir ao vídeo on-line Connecting Java with MS Access using JdbcOdbcDriver duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Param Singh 08 Fevereiro 2014, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 179,975 vezes e gostou 646 espectadores. Boa visualização!