There isn't a method currently to return that, but you could do
something like this:

long getDbSize(SQLiteDatabase db) {
    return db.getPageSize() * DatabaseUtils.longForQuery(db, "PRAGMA
page_count;", null);
}

-Jeff

On Wed, Apr 22, 2009 at 5:59 PM, Kalki <tummala.se...@gmail.com> wrote:
>
> Hi ,
>
> I have created a database using the method openorCreateDatabase() and
> set the maximum size of the database to 1MB using the method
> setMaximumSize().
>
> Now is there any methods available to check the current size of the
> database.
> Will an exception be thrown if the size exceeds 1MB.
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"android-framework" group.
To post to this group, send email to android-framework@googlegroups.com
To unsubscribe from this group, send email to 
android-framework+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/android-framework?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to