Can anyone see why the following code is not creating the table?

Qt Code:
  1. #include <iostream>
  2. #include <QString>
  3. #include <QtSql>
  4. #include "stninfodialog.h"
  5. #include <QDialog>
  6.  
  7. bool makeStnDB() {
  8. QSqlDatabase db = QSqlDatabase::addDatabase("QSQLITE");
  9. db.setDatabaseName("StnInfo.sqlite");
  10. db.open();
  11.  
  12. //Check to see if stninfo exists...
  13. QSqlQuery query = QSqlQuery::QSqlQuery("StnInfo.sqlite");
  14. query.exec("SELECT call FROM stnInfo");
  15.  
  16. if (query.isNull(1)) {
  17. query.exec("CREATE table stnInfo (id int recNum primary key, call varchar(8), name varchar(80),"
  18. " address1 varchar(80), accress2 varchar(80), city varchar(80), state varchar(80), state varchar(40),"
  19. " postalCode varchar(20), country varchar(40), grid varchar(8), cqZone varchar(8), ituZone varchar(8),"
  20. " latitude varchar(8), longitude varchar(8), licenseClass varchar(12))");
  21.  
  22. StnInfoDialog *StnInfoD = new StnInfoDialog();
  23. StnInfoD->show();
  24.  
  25. }
  26. if (!db.open()) {
  27. return false;
  28. }
  29. return true;
  30. }
To copy to clipboard, switch view to plain text mode 

It does return true.
I also tried it without the check to see if stninfo exists and still no luck.