I've been searching for the answer to this problem for a day or two now, I've read hundreds of pages from Google searches, and I just must be overlooking something.
I'm using managed-sqlite to access an SQLite v3 database (not that that's relevant, as I'm just obviously doing something dumb). SELECT works fine, using .ExecuteQuery() on the database. However, trying to use .ExecuteDML() to do anything, like a DELETE or an INSERT just doesn't work. (Edit: I suppose I should mention it *appears* to change the database in memory/temporary store, but doesn't save the database changes across launches of the program.)
For example:
As you can see, I've tried BEGIN'ing/COMMIT'ing the transaction at relevant positions, but I get a "cannot commit transaction - SQL statements in progress" error at the COMMIT.
I'm pulling my hair out - please point out my entirely obvious errors
Thanks in advance!
I'm using managed-sqlite to access an SQLite v3 database (not that that's relevant, as I'm just obviously doing something dumb). SELECT works fine, using .ExecuteQuery() on the database. However, trying to use .ExecuteDML() to do anything, like a DELETE or an INSERT just doesn't work. (Edit: I suppose I should mention it *appears* to change the database in memory/temporary store, but doesn't save the database changes across launches of the program.)
For example:
db.BeginTransaction();
int q = db.ExecuteDML("DELETE FROM conditions WHERE id=" + rowData[0]);
db.CommitTransaction();
As you can see, I've tried BEGIN'ing/COMMIT'ing the transaction at relevant positions, but I get a "cannot commit transaction - SQL statements in progress" error at the COMMIT.
I'm pulling my hair out - please point out my entirely obvious errors
Thanks in advance!