From e2d74a920c3d6a8250d3b3e2f08d9f29f6d6cea7 Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Sun, 10 Jan 2010 21:46:06 +0100 Subject: sqlite3_step have to returen SQLITE_ROW for fetching data --- src/base/database.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/base') diff --git a/src/base/database.cpp b/src/base/database.cpp index ed19a399..96f40745 100644 --- a/src/base/database.cpp +++ b/src/base/database.cpp @@ -191,7 +191,7 @@ namespace usdx sqlite3_stmt *sqliteStatement = sqlite_prepare("PRAGMA user_version;"); int rc = sqlite3_step(sqliteStatement); - if (rc == SQLITE_DONE || rc == SQLITE_ROW) { + if (rc == SQLITE_ROW) { result = sqlite3_column_int(sqliteStatement, 0); } @@ -405,7 +405,7 @@ namespace usdx sqlite3_stmt *sqliteStatement = sqlite_prepare(sqlStatement); int rc = sqlite3_step(sqliteStatement); - if (rc == SQLITE_DONE || rc == SQLITE_ROW) { + if (rc == SQLITE_ROW) { result = sqlite3_column_int(sqliteStatement, 0); } -- cgit v1.2.3