Bonjour

J'ai fait un programme pour créer une table dans hsql
voici le code

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
28
29
30
31
32
33
34
35
 
/**
         * @param args
         * @throws ClassNotFoundException 
         * @throws IllegalAccessException 
         * @throws InstantiationException 
         * @throws SQLException 
         */
	public static void main(String[] args) throws InstantiationException, IllegalAccessException, ClassNotFoundException, SQLException {
		// TODO Raccord de méthode auto-généré
 
		boolean bool = true;
		Class.forName("org.hsqldb.jdbcDriver").newInstance();
		Connection connexion = DriverManager.getConnection("jdbc:hsqldb:mem:database","sa","");
		bool=connexion.isClosed();
		System.out.println(bool);
		Statement  statement = connexion.createStatement();
 
		statement.executeUpdate("CREATE TABLE test(colonne1 INT,colonne2 INT)");
		statement.executeUpdate("INSERT INTO test VALUES (10,12)");
		statement.executeQuery("SHUTDOWN");
		statement.close();
 
		Class.forName("org.hsqldb.jdbcDriver").newInstance();
		Connection connexion2 = DriverManager.getConnection("jdbc:hsqldb:mem:database","sa","");
		Statement  statement2 = connexion2.createStatement();
		ResultSet resultat = statement2.executeQuery("SELECT * FROM test ");
 
		while(resultat.next()){
			System.out.println(resultat.getDouble("colonne1"));		
			}
		statement.close();
 
		}
}
et éclipse me trouve une erreur comme quoi il ne trouve pas la table
Si quelqu'un pouvait m'aider merci

Exception in thread "main" java.sql.SQLException: Table not found in statement [SELECT * FROM test]
at org.hsqldb.jdbc.Util.sqlException(Unknown Source)
at org.hsqldb.jdbc.jdbcStatement.fetchResult(Unknown Source)
at org.hsqldb.jdbc.jdbcStatement.executeQuery(Unknown Source)
at Connexion.main(Connexion.java:36)