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' ?

Thank you.





> On Mon, May 4, 2009 at 9:51 AM, Lucius Fox <[email protected]> wrote:
>>
>> Hi,
>>
>> Can you please tell me how to query the number of rows in a table in
>> Android? Assume I have the name of the table in string.
>>
>> Thank you.
>>
>>
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to