PDA

View Full Version : [SQLite] How to set a savepoint



Kangs
8th April 2011, 17:37
Hi,

I try to set a savepoint in this way :


if ( ! db.transaction() )
return false;

//QSqlQuery query( "savepoint sp1", db );
QSqlQuery query( "savepoint sp1;", db );
if ( ! query.exec() )
std::cerr << query.lastError().text() << '\n';

And i've the error : No query Unable to fetch row
I no other idea on how to do it (except to use directly the sqlite API)

Do you have a idea on how to do it with the Qt API ?

Thx.

viulskiez
9th April 2011, 22:12
Check your sqlite driver version. SAVEPOINT first appeared in SQLITE V 3.6.8.