AW: [android-developers] Re: How does a Cursor work?

2008-12-12 Thread visionera gmbh
hi satya, great comments! thanx for the information. it might be a clever alternative to implement the count(*) functionality by means of a prepared (compiled) statement, if you need the number of results. the cursor will do the iteration job, the prep statement the fast initial counting.

AW: [android-developers] Re: Cannot delete rows from sqlite database

2008-12-04 Thread visionera gmbh
hi, you have to use setTransactionSuccessful() as in int nRows = 0; mDb.beginTransaction(); try { nRows = mDb.delete(mytable, KEY_ITEM + = + rowId,null); mDb.setTransactionSuccessful(); // implies commit at endTransaction } catch( SQLException anyDbError } // error logging ... } finally {