JDougherty/Fire-Department-Management-System — Issue #2: Can't create a database
Author: okeefm
Created: 2011-10-15 18:59:35+00:00
State: open

I tried to start up a new instance of FDMS, but I got the error message that "Database could not be created" whenever I tried to go through the setup. I'm running Win7 x64, and was running the latest version of the project with Qt Creator 2.3.1 with Qt 4.7.4 32 bit. The full set of log files from the program during a run follows.

```
Initialized at Sat Oct 15 14:56:48 2011
Settings Manager: C:/Users/okeefm/AppData/Roaming/FDMS/FDMS.ini does not exist.
Running program setup.
Setup: User wants to install a new instance.
Setup: Database path: C:\cygwin\home\okeefm\fdms_stuff
Database Manager: Closed
Database Manager: C:\cygwin\home\okeefm\fdms_stuff\fdms.db does not exist.
Database Manager: Opened C:\cygwin\home\okeefm\fdms_stuff\fdms.db
Database Manager: Creating the tables.
Database Manager: Structure Initialization: CREATE TABLE department(name TEXT,address TEXT)
Database Manager: Structure Initialization: CREATE TABLE Firefighters(id INTEGER PRIMARY KEY,PI_FirstName TEXT,PI_MiddleName TEXT,PI_LastName TEXT,PI_LocalID TEXT,PI_StateID TEXT,PI_Address TEXT,PI_City TEXT,PI_State TEXT,PI_ZipCode TEXT,PI_Status TEXT,PI_Hphone TEXT,PI_Wphone TEXT,PI_Cphone TEXT,PI_DrvLic TEXT,PI_CDL TEXT)
Database Manager: Structure Initialization: CREATE TABLE training(id INTEGER PRIMARY KEY,title TEXT)
Database Manager: Structure Initialization: CREATE TABLE fftraining(id INTEGER PRIMARY KEY,tid INTEGER,ffid INTEGER,ffesig TEXT,supesig TEXT,tdate TEXT,FOREIGN KEY(tid) REFERENCES training(id),FOREIGN KEY(ffid) REFERENCES firefighters(id))
Database Manager: Structure Initialization: CREATE TABLE equipment(id INTEGER PRIMARY KEY,title TEXT)
Database Manager: Structure Initialization: CREATE TABLE ffequipment(id INTEGER PRIMARY KEY,eqid INTEGER,ffid INTEGER,issued INTEGER,size TEXT,type TEXT,serial TEXT,year TEXT,FOREIGN KEY(eqid) REFERENCES equipment(id),FOREIGN KEY(ffid) REFERENCES firefighters(id))
Database Manager: Structure Initialization: CREATE TABLE Drills(id INTEGER PRIMARY KEY,DI_StartTime INTEGER,DI_DrillNumber TEXT,DI_EndTime INTEGER,DI_Location TEXT,DI_InHouse INTEGER,DI_IncidentCommander TEXT,DI_Description TEXT)
Database Manager: Structure Initialization: CREATE TABLE drillsheet(id INTEGER PRIMARY KEY, did INTEGER,ffid INTEGER,timein TEXT,timeout TEXT,FOREIGN KEY(did) REFERENCES drills(id) ,FOREIGN KEY(ffid) REFERENCES firefighters(id))
Database Manager: Structure Initialization: CREATE TABLE inventory(id INTEGER PRIMARY KEY,name TEXT,description TEXT,category TEXT)
Database Manager: Structure Initialization: CREATE TABLE inventorycheck(id INTEGER PRIMARY KEY,iid INTEGER,name TEXT,description TEXT,category TEXT,checked INTEGER)
QSqlQuery::prepare: empty query
Database Manager: Executing Query:
Database Manager: Could not create table 'Calls': No query Unable to fetch row
Setup: Critical Error - Database: Could not be created.
QSqlDatabasePrivate::removeDatabase: connection 'qt_sql_default_connection' is still in use, all queries will cease to work.
```