Hi all,

I've recently been trying to connect to a PostgreSql database using the QPSQL plugin. I can connect to my database, but can't get info from any queries. The output from the SQLError class is given as following:
"Error: Relation "node" does not exist"
Line 1: Select * from Node

QPSQL: Unable to create query.

I tried using the SQL Browser demo to connect to my database as well. I have the option to connect using the QPSQL driver. I can connect to the database through here. When I click the arrow by my connection, all of the tables in my database are listed. However, trying to click on any of the tables yields the message "Unable to find table X". Attempting to write a select query in the query browser returns the same error listed above. My source to access the database is listed below...
Qt Code:
  1. TextStream output(stdout);
  2. QSqlDatabase db = QSqlDatabase::addDatabase(DBDRIVER);
  3. db.setHostName(DBHOST);
  4. db.setDatabaseName(DBNAME);
  5. db.setUserName(USERNAME);
  6. db.setPassword(PASSWORD);
  7. QSqlQuery qry;
  8.  
  9.  
  10. if ( db.open() )
  11. {
  12. qry.exec("select * from Node");
  13.  
  14. QSqlError err = qry.lastError();
  15. QString sErr = err.text();
  16. output << sErr;
  17.  
  18. while(qry.next())
  19. {
  20. QString name = qry.value(1).toString();
  21. output << name;
  22. }
  23. }
  24. return qry;
  25. }
To copy to clipboard, switch view to plain text mode 

If it matters I'm running QT 4.6.2 on Windows 7 and attempting to connect to PostgreSql 8.4 on Ubuntu. I can successfully get queries out of the pgAdmin tool that was bundled with PostgreSql. Any help is greatly appreciated. Thank you for your time and consideration.