Hello All
I have followed the example to insert a record using BEGIN/COMMIT/
ROLLBACK
I always get
Error - Not Saved Database operation failed. ERROR: SQL logic error or
missing database DETAILS: SQL logic error or missing database
The Table Walks exists. This code works without BEGIN/COMMIT/ROLLBACK.
I realise transactions are for multiple executes, but surely this
simple case should work?
Am I missing something obvious here?
It's driving me nuts!
TIA
Rambler
var pos='Test';
var db = google.gears.factory.create('beta.database');
db.open('stored_walks');
db.execute('BEGIN');
try {
db.execute('insert into Walks
(WalkX,WalkY,WalkName,Timestamp) VALUES (?, ?, ?, ?)', [100, 200, pos,
new Date().getTime()]);
db.execute('COMMIT');
} catch(exp) {
alert("Error - "+e.message);
db.execute('ROLLBACK');
} finally {
db.close();
}
}