mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
Fix in sqlite3
git-svn-id: svn://ultimatepp.org/upp/trunk@833 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
0dfc5f6265
commit
2b8226e0e5
1 changed files with 7 additions and 2 deletions
|
|
@ -273,8 +273,13 @@ bool Sqlite3Session::Open(const char* filename) {
|
|||
// However, using the ATTACH sql command, it can connect to more databases.
|
||||
// I don't know how to get the list of attached databases from the API
|
||||
current_dbname = "main";
|
||||
bool opened = (SQLITE_OK == sqlite3_open(filename, &db));
|
||||
return opened;
|
||||
if(SQLITE_OK == sqlite3_open(filename, &db))
|
||||
return true;
|
||||
if(db) {
|
||||
sqlite3_close(db);
|
||||
db = NULL;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
void Sqlite3Session::Close() {
|
||||
if (NULL != db) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue