Skip to content

Poco::Data::RecordSet: rowCount not reset after execute #1171

@micheleselea

Description

@micheleselea

Hi all, I think there's something wrong with RecordSet called multiple time on SELECT.
Take this code as example:
`
Poco::Data::Statement select(cDBsession);
select << "SELECT * FROM car_plates ORDER BY DateTime DESC", Keywords::range(0, 50000);
while (!select.done()) {
select.execute();
Poco::Data::RecordSet rs(select);
bool more = rs.moveFirst();
if (!more)
break;

std::size_t cols = rs.columnCount();
std::size_t rows = rs.rowCount();
.....other stuff
}
`

You expect the fist run rows=50000 and it's correct. second run should be the same, instead rows will be 100000...and if you cicle until rs.moveNext() return true, you will get an exception on row 50000 obviously. I'm trying with iterator to see if it's the same

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions