String strurl="jdbc:odbc:driver={Microsoft Access Driver (*.mdb)};DBQ=D:\\demo.mdb";
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection conn=DriverManager.getConnection(strurl) ;
Statement stmt=conn.createStatement();
ResultSet rs=stmt.executeQuery(sql_string);
if(rs.next())
{
//相关处理
rs.close();
stmt.close();
conn.close();
}
else
{
//相关处理
rs.close();
stmt.close();
conn.close();
}