Open project
From TaskDepender
(→Introduction) |
(→Implementation) |
||
Line 1: | Line 1: | ||
− | ''This page describes the method | + | ''This page describes the method to start a new project.'' |
− | == | + | == Description == |
Opening a project can be a new or existing project. | Opening a project can be a new or existing project. | ||
Line 14: | Line 14: | ||
== Implementation == | == Implementation == | ||
− | The implementation uses the [http://www.sqlite.org/c3ref/open.html sqlite3_open_v2] function. | + | The implementation uses the [http://www.sqlite.org/c3ref/open.html <tt>sqlite3_open_v2</tt>] function. |
If the filename is an empty string, then a private, temporary on-disk database will be created. This private database will be automatically deleted as soon as the database connection is closed. | If the filename is an empty string, then a private, temporary on-disk database will be created. This private database will be automatically deleted as soon as the database connection is closed. | ||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
− | int Admin::Open( char *filename ) | + | int Admin::Open(char *filename) |
{ | { | ||
+ | int returnValue; | ||
if( filename == NULL ) | if( filename == NULL ) | ||
{ | { | ||
Line 28: | Line 29: | ||
{ | { | ||
// Try to open the database. | // Try to open the database. | ||
− | + | returnValue = sqlite3_open_v2( xx, xx, xx ); | |
+ | if( returnValue == SQL_OK ) | ||
+ | |||
} | } | ||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
+ | The following errors can be returned by the SQL-open function. | ||
− | The | + | http://www.sqlite.org/c3ref/c_abort.html |
+ | |||
+ | The following table converts the possible SQLITE error-codes into error-codes for the [[Administration]] | ||
== Design == | == Design == |