Overview
Features
Download
Documentation
Community
Add-Ons & Services

Poco Data Tunck executeWithoutLimit?

Please post support and help requests here.

Poco Data Tunck executeWithoutLimit?

Postby lilinghui » 01 Sep 2010, 10:17

std::size_t StatementImpl::executeWithoutLimit()
{
poco_assert (_state != ST_DONE);
std::size_t count = 0;

do
{
bind();
while (hasNext()) count += next();
} while (canBind());

return count ? count : affectedRowCount();
}

if i get one row by key like this "SELECT ID, [Name], Age FROM Test WHERE ID = 1",


Statement stmt(*_pSession << sql);
std::size_t size = stmt.execute();
if this record don't exsit, but the execute() get 1 return, why affectedRowCount is 1? alex help?
lilinghui
 
Posts: 7
Joined: 11 Jan 2010, 06:00

Re: Poco Data Tunck executeWithoutLimit?

Postby huailongs » 01 Sep 2010, 12:09

i haven't use poco::data classes.

i may use poco::data::sqlite in the future.

we can communicate with each other in using poco.

my qq:389665
huailongs
 
Posts: 15
Joined: 13 Aug 2010, 15:28

Re: Poco Data Tunck executeWithoutLimit?

Postby Hitnrun » 29 Sep 2012, 23:22

I am too having this problem, a query with a bound variable with a value that doesn't exists, returns 1 event if no record was processed. This also makes lowerLimit(1) to not throw an exception.

The affectedRowCount() function on SQLitem Impl seems to be counting the number of bindings, what's the logic in this behavior?
Hitnrun
 
Posts: 20
Joined: 01 Apr 2009, 18:32


Return to Support

Who is online

Users browsing this forum: No registered users and 3 guests

cron