Tdd create

From TaskDepender
Jump to: navigation, search
(Design)
(Implementation)
 
Line 8: Line 8:
 
  * Creates the TaskDepender database in the specified file.
 
  * Creates the TaskDepender database in the specified file.
 
  */
 
  */
int tdd_create
+
HANDLE tdd_create
 
(
 
(
 
   char *filename // Filename of the database file to create.
 
   char *filename // Filename of the database file to create.
Line 44: Line 44:
 
   if(rc)
 
   if(rc)
 
   {
 
   {
    tdd_handle_error(rc);
 
    errorMsg = AnsiString(sqlite3_errmsg(db));
 
 
     sqlite3_close(db);
 
     sqlite3_close(db);
    db = NULL;
 
 
     return &db;     
 
     return &db;     
 
   }
 
   }
  
 
   // -- Create tasks table --
 
   // -- Create tasks table --
 
+
  rc = sqlite3_exec(db, TDD_CREATE_TASKS_TABLE, NULL, NULL, &dbError );
 +
 
 
   // -- Create deliverables table --
 
   // -- Create deliverables table --
 +
  rc = sqlite3_exec(db, TDD_CREATE_DELIVERABLES_TABLE, NULL, NULL, &dbError );
  
# Create the [[Deliverables database table|deliverables table]].
+
  // -- Create the connections table --
# Create the [[Connections database table|connections table]].
+
  rc = sqlite3_exec(db, TDD_CREATE_CONNECTIONS_TABLE, NULL, NULL, &dbError );
 +
 
 +
  // -- Create the temporary task-list table --
 +
  rc = sqlite3_exec(db, TDD_CREATE_TASKLIST_TABLE, NULL, NULL, &dbError );
 +
 
 +
  // -- Create the temporary deliverable-list table --
 +
  rc = sqlite3_exec(db, TDD_CREATE_TASKS_TABLE, NULL, NULL, &dbError );
 +
 
 +
  // -- Create the temporary connection-list table --
 +
  rc = sqlite3_exec(db, TDD_CREATE_TASKS_TABLE, NULL, NULL, &dbError );
  
  
Line 62: Line 70:
  
 
   return &db;  
 
   return &db;  
 +
}
 
</syntaxhighlight>
 
</syntaxhighlight>
  

Latest revision as of 10:31, 22 October 2011

Personal tools