On Mon, May 4, 2009 at 1:17 PM, Lucius Fox <[email protected]> wrote:
> > On Mon, May 4, 2009 at 9:58 AM, Marco Nelissen <[email protected]> > wrote: > > select count(*) from table > > See also http://sqlite.org/lang.html > > > > Thank you. Here is what i try: > > public void getRow(SQLiteDatabase db) { > db.beginTransaction(); > try { > > db.execSQL("select count(*) from mytable"); > db.setTransactionSuccessful(); > version = 3; > } catch (SQLException ex) { > > Log.e(LOG_TAG, ex.getMessage(), ex); > } finally { > db.endTransaction(); > } > > } > > but how can I get the actual result from the 'execSQL' ? Use db.rawQuery() instead and retrieve the value from the resulting Cursor. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

