Overview
Features
Download
Documentation
Community
Add-Ons & Services

Problem with SQLite statement execute

Please post support and help requests here.

Problem with SQLite statement execute

Postby beetie » 08 Jul 2014, 17:06

Hi. I'm having a problem making the following code work:

Poco::Data::Session sd("SQLite", "mydb.sql");
Poco::Data::Statement select(sd);
select << "SELECT id,symbol,category,namw FROM mytbl ORDER BY id", Poco::Data::range(0,10000);
Poco::Data::RecordSet rs(select);
while (!select.done())
{
select.execute();
bool more = rs.moveFirst();
while (more)
{
// process stuff here
more = rs.moveNext();
}
}

After the "select.execute();" statement, the application outputs "Not found" and terminates.
The query works in an SQLite editor.

Any advice?

Thanks in advance.

Also, is there a way to stop the application from terminating after unsuccessful SQLite operations?
beetie
 
Posts: 2
Joined: 08 Jul 2014, 16:53

Re: Problem with SQLite statement execute

Postby beetie » 09 Jul 2014, 10:04

I discovered the source of the problem. It seems that an exception is thrown whenever a select is made with a column of the DATETIME or DATE type. By changing the columns to VARCHAR, everything works fine. Is this a known bug?
beetie
 
Posts: 2
Joined: 08 Jul 2014, 16:53


Return to Support

Who is online

Users browsing this forum: No registered users and 5 guests

cron