Update:
Sometimes I can update data and sometimes I can't. I haven't discovered the reason yet, but can it have something to do with the number of sqls I execute? Say, if I execute several sqls of the type:
"select t.*, t.rowid from classrelation t order
by t.classid;", but on different tables...