GH #499: Poco::Data::Statement::execute returns wrong value when zero results (ODBC)

This commit is contained in:
Aleksandar Fabijanic
2014-12-17 23:36:26 -06:00
parent 55dffd864f
commit 86b81bfcbd
24 changed files with 80 additions and 18 deletions

View File

@@ -32,7 +32,7 @@ namespace Data {
namespace SQLite {
const std::size_t SQLiteStatementImpl::POCO_SQLITE_INV_ROW_CNT = std::numeric_limits<std::size_t>::max();
const int SQLiteStatementImpl::POCO_SQLITE_INV_ROW_CNT = std::numeric_limits<std::size_t>::max();
SQLiteStatementImpl::SQLiteStatementImpl(Poco::Data::SessionImpl& rSession, sqlite3* pDB):
@@ -302,7 +302,7 @@ const MetaColumn& SQLiteStatementImpl::metaColumn(std::size_t pos) const
}
std::size_t SQLiteStatementImpl::affectedRowCount() const
int SQLiteStatementImpl::affectedRowCount() const
{
if (_affectedRowCount != POCO_SQLITE_INV_ROW_CNT) return _affectedRowCount;
return _pStmt == 0 || sqlite3_stmt_readonly(_pStmt) ? 0 : sqlite3_changes(_pDB);