* BUGFIX: SQLiteStatement was return affected rows even when there were none

* Allows binding of null Poco::Any.
This commit is contained in:
Rangel Reale
2012-11-11 11:54:38 -02:00
parent c867a80520
commit 74cb607471
2 changed files with 4 additions and 2 deletions

View File

@@ -194,12 +194,12 @@ void SQLiteStatementImpl::bindImpl()
if (_bindBegin != bindings().end())
{
_affectedRowCount = (*_bindBegin)->numOfRowsHandled();
std::size_t boundRowCount = (*_bindBegin)->numOfRowsHandled();
Bindings::iterator oldBegin = _bindBegin;
for (std::size_t pos = 1; _bindBegin != bindEnd && (*_bindBegin)->canBind(); ++_bindBegin)
{
if (_affectedRowCount != (*_bindBegin)->numOfRowsHandled())
if (boundRowCount != (*_bindBegin)->numOfRowsHandled())
throw BindingException("Size mismatch in Bindings. All Bindings MUST have the same size");
(*_bindBegin)->bind(pos);