Sqlite + Java: table not updating
- by Ben L
I'm using a Java wrapper for SQLite called SQLiteJDBC - this may have some bearing on any answers...
I have a table which I've displayed in a GUI, within that UI I have a button for the fields for an individual row of that table. When I save my changes I do this...
Statement stmt = connection.createStatement();
stmt.execute("update 'tableName' set 'fieldName'=1 where userid=1");
int updateCount = stmt.getUpdateCount();
My connection is valid, I get no exceptions thrown and getUpdateCount() returns '1' indicating that one row has been updated. However my table is not updated. I've spent the last few hours trying to work out what's going on but I'm not having any luck. Help!!