Come dicevo prima di access non ne so molto, cmq il problema è sempre nella sintassi sql, access vuole che i campi della clausola where siano referenziati alla tabella. Questo è un esempio funzionante fatto seguendo la tabella che hai postato :
codice:
public static void main(String[] args)
{
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
// set this to a MS Access DB you have on your machine
String filename = "c:/TEMP/database.mdb";
String database = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=";
database += filename.trim() + ";DriverID=22;READONLY=true}"; // add on to the end
// now we can get the connection from the DriverManager
Connection con = DriverManager.getConnection(database, "", "");
Statement st = con.createStatement();
ResultSet result = st.executeQuery("select * from files where files.NomeFile='mioFile'");
while(result.next())
{
System.out.println(result.getInt(1));
System.out.println(result.getString(2));
}
}
catch (Exception e)
{
System.out.println("Error: " + e);
}
}