Bonjour, pouvez-vous me dire comment effectuer une requete SQL à une base de données Access, car moi j'obtiens à chaque fois une erreur.

Voici ma requête :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
 
//req = 15
req = "SELECT Numero FROM profEleve WHERE 'professeur' = '"+req+"'";
		try{
			Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
			String url= "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=C:\ClassedeR5B.mdb";
			Connection connection = DriverManager.getConnection(url,"","");
			String requete = req;
			Statement instruction = connection.createStatement();
ResultSet resultat = instruction.executeQuery(requete);
			while(resultat.next()){
				System.out.println(resultat.getString("Numero"));
			}
connection.close();
		}catch(ClassNotFoundException e) {
  			System.err.println("Driver non chargé !");
  			e.printStackTrace();
		}catch(SQLException sql){
			System.out.println("ERREUR SQL");
			System.out.println(req);
			//ERREUR DE BASE DE DONNEE
			sql.printStackTrace();
		}catch(Exception e){
			System.out.println("ERREUR FATALE"+e);
			e.printStackTrace();
			//ERREUR DE BASE DE DONNEE
		}
Merci de votre aide.