[View]  [Edit]  [Lock]  [References]  [Attachments]  [History]  [Home]  [Changes]  [Search]  [Help] 

test[sqlite3] 007 Update some records

[ | db values |
db := SQLiteDatabase openDatabase: '/data/data/net.smalltalking.s8.jx8/testdb' factory: nil flags: SQLiteDatabase openReadwrite.
values := ContentValues instance.
values put: 'code' value: 's8'.
values put: 'description' value: 'awesome'.
db 
	update: 'testTable'
	values: values
	whereClause: 'code=?'
	whereArgs: (Array with: 's8').
db close.
] on: Error do: [:ex | self print: 'table could not be updated' ]