Bonjour,


La connection avec PostgreSQL fonctionne, mais lorsque je fais un select sur ma
table, j'ai une erreur :

ERROR: relation "personne" does not exist


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
 try {
         Class.forName("org.postgresql.Driver"); 
      } catch (ClassNotFoundException cnfe) {
	  return;
      }	
 
      Connection c = null;
 
      try {
	    c = DriverManager.getConnection("jdbc:postgresql://localhost/postgres",
		                                    "postgres", "motdepasse");
	  } catch (SQLException se) {
	    return;
	  }
 
    ResultSet resultat = null;
 
    try {
    	  PreparedStatement pstmt = c.prepareStatement("SELECT Nom FROM Personne");
    	  resultat = pstmt.executeQuery();

Et pourtant j'ai bien une table qui s'appelle Personne dans ma BD "postgres"

Est-ce que quelqu'un pourrait m'aider svp?

Merci :-)