diff options
Diffstat (limited to 'ADBC/adbc/SQLite/Query.cpp')
-rw-r--r-- | ADBC/adbc/SQLite/Query.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/ADBC/adbc/SQLite/Query.cpp b/ADBC/adbc/SQLite/Query.cpp index 662d2f3f129..1cee7ebfe41 100644 --- a/ADBC/adbc/SQLite/Query.cpp +++ b/ADBC/adbc/SQLite/Query.cpp @@ -60,6 +60,10 @@ void Query::execute_no_record (void) // Execute the SQL statement. int retval = ::sqlite3_step (this->stmt_); + + if (retval == SQLITE_ERROR) + throw Exception (this->parent_); + this->needs_reseting_ = true; if (retval != SQLITE_DONE) @@ -80,14 +84,14 @@ Record * Query::execute (void) // Initialize the cursor for the record. int retval = ::sqlite3_step (this->stmt_); - Record * record = 0; - - ACE_NEW_THROW_EX (record, - Record (*this, retval), - ACE_bad_alloc ()); + if (retval == SQLITE_ERROR) + throw Exception (this->parent_); + // Update the record's state for the new query. + this->record_.state_ = retval; this->needs_reseting_ = true; - return record; + + return &this->record_; } // |