Connect JSP with ACCESS database

0
Hello, I am trying to connect a JSP class with ACCESS but it is returning the following error: "java.lang.ClassNotFoundException: sun.jdbc.odbc.JdbcOdbcDriver" Does anyone know how to solve this?

<%@ page import ="java.sql.*" %>
<%
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
String database = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=/caminho do banco.accdb;DriverID=22;READONLY=true}";
Connection con = DriverManager.getConnection(database);
String SQL = "Select * from valores order by equipamento";

Statement stmt = con.createStatement();
ResultSet rst = stmt.executeQuery(SQL);

 while (rst.next()) {
   out.println(rst.getString("equipamento") + " " + rst.getString("valor") + "<br>");
 }

rst.close();
stmt.close();
con.close();
%>
    
asked by anonymous 09.11.2016 / 16:04

0 answers